LoginSignup
3
3

More than 5 years have passed since last update.

.htaccessでUserAgent判定でファイルをリダイレクトさせる

Posted at

UserAgentを見て、PCとSPの閲覧するファイルを変更する覚書。
ちょっと自信がないのでサーバーサイドの人がアドバイスくれると嬉しいです。^^

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} (iPod|iPhone|iPad|Android|Windows.Phone)
RewriteRule ^index.html index_sp.html [L]
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3