Simple .htaccess Mobile Redirect


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
  2. RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
  3. RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.