I try to create a very simple rewrite rule with nginx, but i doesnt work.<br><br>I have set up my server with a "catch all" server_name *.mydomain.com<br><br>I then try to create a rewrite rule so that requests to <a href="http://mysubdomain.mydomain.com/wiki.php?wiki=WIKIPAGE">mysubdomain.mydomain.com/wiki.php?wiki=WIKIPAGE</a> will be rewritten to <a href="http://mysubdomain.mydomain.com/WIKIPAGE">mysubdomain.mydomain.com/WIKIPAGE</a><br>
<br>Here is the option that i thought would work:<br><br> server {<br> server_name <a href="http://mysubdomain.domain.com">mysubdomain.domain.com</a>;<br> if (!-e $request_filename) {<br> rewrite ^/(.*)$ /wiki.php?wiki=$1 last;<br>
}<br> }<br><br>Suggestions to why this does not work are highly appreciated.<br><br>Thanks,<br>per<br>