我有多域magento網站。像www.domain.com for desktop和m.domain.com for mobile一樣。Magento手機網站全站點重定向
我用下面的代碼來檢測移動設備和重定向to m.domain.com, which is working fine
,但是當需要來www.domain.com與鏈接像http://www.domain.com/?___store=defaultit goes in redirect loop. how to fix it
您的幫助appreciate.`
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} !___store=default [NC]
RewriteCond %{HTTP_COOKIE} !track=default [NC]
RewriteRule (.*) http://m.domain.com/$1 [L,R=301] [E=MAGE_RUN_CODE:mobile]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} ___store=default [NC]
RewriteRule (.*) http://www.domain.com/ [L,R=301] [E=MAGE_RUN_CODE:base,CO=track:default:%{HTTP_HOST}]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} !___store=mobileview [NC]
RewriteCond %{HTTP_COOKIE} track=default [NC]
RewriteRule (.*) http://www.domain.com/ [L,R=301] [E=MAGE_RUN_CODE:base]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{QUERY_STRING} ___store=mobileview [NC]
RewriteRule (.*) http://m.domain.com/$1 [E=MAGE_RUN_CODE:mobile,CO=track:mobile:%{HTTP_HOST}]`
感謝回答,但你發送重定向是桌面網站,移動網站,這已經是做工精細,我想從手機,它出現在環 – Jennifer