I wrote
RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
RewriteRule .* /IE [R=403,L]
to redirect all ie users to the folder IE.
Then I tried
RewriteCond %{HTTP_USER_AGENT} !.*MSIE.*
RewriteCond %{HTTP_HOST} /IE
RewriteRule .* 404.html [R=404,L]
But it didn’t work.
How can I make it work?
You are using the wrong var.
%{HTTP_HOST}matches against the hostname, not the folder. I think you want something like this:Note that the
R=404forces a 404 response, it doesn’t actually redirect you anywhere.