.htaccess - hot to prevent a mobile rewrite rule to be applied to a specific folder -
i have rules in htaccess
rewriteengine on rewritecond %{http_host} !^m\my 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]
i want rule not apply folder admin , it's content. think should work if placed right below line
rewriteengine on rewritecond %{request_uri} !^/admin/ rewriterule ^.*$ - [nc,l]
but not. appreciated. thanks
you can use:
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]
Comments
Post a Comment