Convert Apache rewrite to NGinx

Francis Daly francis at daoine.org
Sun Mar 3 15:01:09 UTC 2013


On Sun, Mar 03, 2013 at 01:52:48PM +0100, GASPARD kévin wrote:

Hi there,

> Using nginx 1.2.1 on Debian Wheezy 64 bits.
> 
> My wordpress need rewrite, it gave me this:

> # nginx configuration
> 
> location / {
>     if (!-e $request_filename){
>       rewrite ^(.*)$ /index.php break;
>     }
> }

See http://wiki.nginx.org/Pitfalls

Particularly the "Front Controller Pattern based packages" section.

Probably a single extra try_files line will work for you.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list