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 &quot;catch all&quot; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_name <a href="http://mysubdomain.domain.com">mysubdomain.domain.com</a>;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!-e $request_filename) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite ^/(.*)$ /wiki.php?wiki=$1 last;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>Suggestions to why this does not work are highly appreciated.<br><br>Thanks,<br>per<br>