5

Migrating Apache rewrites to Nginx

view full story
linux-howto

http://serverfault.com – I am trying to serve static HTML with server side PHP processing with Nginx. I have no experience with Apache. I would like to migrate the following re-writes from Apache's .htaccess to Nginx. What would be the corresponding rewrites for a server or location block in Nginx's default.conf? #.htaccess AddDefaultCharset utf-8 <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(min\-merge\-cache)=(css|js)\/(.*)$ /static-server/min-merge-cache.php? files=$3&format=$2 [NC,L,NS] RewriteRule ^$ /static-server/file-server.php?file=index&ext=html [NC,L,NS] RewriteRule ^(.*)\.(js| (HowTos)