Can these rules be ported easily to nginx?

Shri @ DevLib.Org shri at devlib.org
Sun Dec 28 20:56:58 MSK 2008


I'm considering migrating an ecommerce site that we run, to nginx.

The default rules that we have in Apache, look fairly complex and I'd like to seek some guidance to see if they can be migrated to Ngix 0.7.27 or somewhere close to that.

1) RedirectMatch gone:

# block all smarty templates (no reason to have these exposed) 
RedirectMatch gone ^/.*\.tpl$ 

2) Complex RewriteRules. These just work under Apache and while I've had sucess in several instances with nginx by replacing RewriteRule with rewrite and the [QSA,L] with last, I'd like to see if anyone spots anything obvious.

RewriteRule ^([^/]*/)?[^/]+-printable-(productcode|title|price|orderby)-up-c-([0-9]+)-p-([0-9]+)\.html$ $1home.php?printable=Y&sort=$2&sort_direction=0&cat=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-printable-(productcode|title|price|orderby)-down-c-([0-9]+)-p-([0-9]+)\.html$ $1home.php?printable=Y&sort=$2&sort_direction=1&cat=$3&page=$4 [QSA,L]

Regards,
Shri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20081229/96368ad4/attachment.html>


More information about the nginx mailing list