I want to redirect IE users to a static file, regardless of what page they were trying to reach.

My code is inside a server block:

if ($http_user_agent ~* msie ) { rewrite ^.+$ /msie.html last; }

No matter what I try, I either get a 404 or a 500 Internal Server Error. Am I doing this correctly?

link|improve this question

70% accept rate
feedback

1 Answer

up vote 0 down vote accepted

Found a way to do it by doing:

try_files $uri /msie.html;
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.