Created
April 25, 2013 15:27
Revisions
-
fnhipster created this gist
Apr 25, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # MOBILE REDIRECT RewriteCond %{REQUEST_URI} !/mobile.*$ RewriteCond %{REQUEST_URI} !/hub.*$ RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC] RewriteRule ^(.*)$ /mobile [L,R=302] # if a user is accessing a mobile page from desktop then show desktop version RewriteCond %{HTTP_USER_AGENT} "!android|!blackberry|!iphone|!ipod|!iemobile|!opera mobile|!palmos|!webos|!googlebot-mobile" [NC] RewriteRule ^mobile/(.*)$ / [L,R=302] # END MOBILE