converting apache rewrites to nginx

Andrew Thornton andrew.thornton at thorntonindustries.com
Sun Jan 4 23:01:09 MSK 2009


Hello,

I am currently trying to get a deployment ready in an attempt to migrate my
wiki from apache to nginx and php-fpm. Things have gone pretty smoothly so
far, but I am having a real problem with rewrite rules. Here is what is
currently in my apache config for a rewrite:

<Directory "/var/www/ws/wiki">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?title=$1 [PT,L,QSA]
RewriteRule ^(images|skins)\/(.*)$ http://images.testsite.com/$1/$2 [L]
</Directory>

I have tried adding this a couple of different ways into the nginx config
file but it isn't working. Can someone give me a hand with this? Also, where
can I find docs on the rewrite functionality within nginx?

I appreciate any and all help,

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090104/aa88ed84/attachment.html>


More information about the nginx mailing list