Nginx rewrite non-existent files under sub directory with rewrite rules

Joyce Babu joyce at
Thu Nov 27 08:27:39 UTC 2014

I am getting a new dedicated server and need to decide between Nginx and
Apache Event MPM. I have received expert advice to use Nginx, but unless I
have a solution to this problem I am unable to move to Nginx. I have been
trying to solve this for the past 3 days. I have been checking the Nginx
debug log with several configuration, and found that the problem is order
of matching. Unfortunately, I can't find any sample Nginx configuration
which rewrites a .php file to another .php file within a subdirectory
location block.

Any help or pointer in the right direction is much appreciated.

Thank You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list