[英]htaccess redirect all except me doesn't work
everything working perfectly BUT my IP redirect as well, I need to redirect all user to the Mobile version of the site except.. so the direction working fine, but my IP redirected too!! 一切工作正常,但我的IP重定向也是如此,我需要将所有用户重定向到该网站的移动版,..所以该方向正常,但我的IP也重定向了!! any suggestions?! 有什么建议么?!
thanks in advance 提前致谢
#Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?DOMAIN\.com$
RewriteCond %{REMOTE_HOST} !^xxx\.xxx\.xxx\.xxx
RewriteRule ^(.*)$ http://m.DOMAIN.com/$1 [R=301,L]
您需要变量%{REMOTE_ADDR}
而不是%{REMOTE_HOST}
,它是主机名(规范地址)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.