Problem with simple rewrite rule

Per Hans Hansen pehaha at
Sun Mar 9 22:01:44 MSK 2008

I try to create a very simple rewrite rule with nginx, but i doesnt work.

I have set up my server with a "catch all" server_name *

I then try to create a rewrite rule so that requests to will be rewritten to

Here is the option that i thought would work:

       server {
             if (!-e $request_filename) {
             rewrite ^/(.*)$ /wiki.php?wiki=$1 last;

Suggestions to why this does not work are highly appreciated.

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

More information about the nginx mailing list