hot以防止移动重写规则应用于特定文件夹



我的htaccess 中有这些规则

RewriteEngine on
RewriteCond %{HTTP_HOST} !^mmy site.it$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_COOKIE} !mobilecookie=true
RewriteRule ^(.*)$ http://m.my site.it%{REQUEST_URI} [L,R=302]

我希望这个规则不适用于文件夹管理员,它是内容。我认为如果放在线的正下方,这应该有效

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/admin/ 
RewriteRule ^.*$ - [NC,L]

但事实并非如此。非常感谢您的帮助。感谢

您可以使用:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/admin/ 
RewriteCond %{HTTP_HOST} !^m.
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_COOKIE} !mobilecookie=true
RewriteRule ^(.*)$ http://m.my.site.it%{REQUEST_URI} [L,R=302]

最新更新