How do I enable my mobile website to bypass mobile redirect?
I successfully set up mobile redirect directory based on device but the
client wants a link back to the full site.
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteCond %{REQUEST_URI} !^/mobile/.*$
RewriteCond %{HTTP_USER_AGENT} **{mobile dectection code I removed for
this post}**
RewriteRule ^(.*)$ /mobile/ [L,R=302]
I put a .htaccess file with rewritengine off into the directory of the
mobile website.
Any idea what rewrite conditions to use when both the mobile and main
website use the same domain? Alternatively, would this be easier if I made
a separate domain for the mobile website?
No comments:
Post a Comment