Nginx Redirection Issue
Posted
by
James Gu
on Server Fault
See other posts from Server Fault
or by James Gu
Published on 2012-11-20T20:33:48Z
Indexed on
2012/11/20
23:04 UTC
Read the original article
Hit count: 273
My Nginx setting currently has this:
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ https://domain.com/index.php?id=$1 redirect;
}
}
Basically for non-existing pages (404) it redirects user to the home page. But now I have a wordpress blog setup at https://domain.com/blog/, but any wordpress items eg. https://domain.com/blog/test also got redirected to the home page. I wonder how to fix this?
© Server Fault or respective owner