Last active
December 25, 2015 06:29
-
-
Save NorihikoMoriyama/6932357 to your computer and use it in GitHub Desktop.
タブレットとスマフォの振り分け[.htaccess]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErrorDocument 404 /****/notfound/index.html | |
RewriteEngine On | |
RewriteCond %{HTTP_USER_AGENT} Android.*Mobile | |
RewriteCond %{REQUEST_URI} !^/.*\.(gif|jpg)$ | |
RewriteCond %{REQUEST_URI} !/sp/.*$ | |
RewriteCond %{REQUEST_URI} !/notfound/.*$ | |
RewriteRule ^(.*)$ /****/sp/$1 [R,L] | |
RewriteCond %{HTTP_USER_AGENT} (Android|iPad) | |
RewriteCond %{REQUEST_URI} !^/.*\.(gif|jpg)$ | |
RewriteCond %{REQUEST_URI} !/sp/.*$ | |
RewriteCond %{REQUEST_URI} !/tb/.*$ | |
RewriteCond %{REQUEST_URI} !/notfound/.*$ | |
RewriteRule ^(.*)$ /****/tb/$1 [R,L] | |
RewriteCond %{HTTP_USER_AGENT} (iPhone|iPod|BlackBerry|Windows\ Phone) [NC] | |
RewriteCond %{REQUEST_URI} !^/.*\.(gif|jpg)$ | |
RewriteCond %{REQUEST_URI} !/sp/.*$ | |
RewriteCond %{REQUEST_URI} !/notfound/.*$ | |
RewriteRule ^(.*)$ /****/sp/$1 [R,L] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment