Magento redirect mobile user to mobile site and get back to “full website” from mobile using htaccess
I use mobile theme for magento And now I want to create a link to view FULL SITE (if user selects they are taken to the desktop version of the site) Link to view full site, which enables the user to view the desktop site on mobile. Once the user has chosen this option they will be unable to return to the mobile site.
Change this value as in your store:
Mobile store code = mstore
Mobile store code = mstore
Mobile website code = mobileview
Main site store code = default
Main site store code = default
#*************************
SetEnv MAGE_RUN_TYPE website
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} !___store=default [NC]
RewriteCond %{HTTP_COOKIE} !track=default [NC]
RewriteRule ^ - [E=MAGE_RUN_CODE:mobileview]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} ___store=default [NC]
RewriteRule ^ - [E=MAGE_RUN_CODE:base,CO=track:default:%{HTTP_HOST}]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} !___store=mobileview [NC]
RewriteCond %{HTTP_COOKIE} track=default [NC]
RewriteRule ^ - [E=MAGE_RUN_CODE:base]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} ___store=mobileview [NC]
RewriteRule ^ - [E=MAGE_RUN_CODE:mobileview,CO=track:mstore:%{HTTP_HOST}]
#***********************
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment