Rewriting https to http

ianevans at ianevans at
Fri Jan 12 00:26:44 MSK 2007


How would I get nginx to rewrite from https to http unless the directory
was one I specified? Here's how it's done in Apache:

RewriteCond %{SERVER_PORT} ^443$
RewriteCond $1 !^(securedir|2ndsecuredir|3rdsecuredir)/ [NC,OR]
RewriteCond $1 !\.(css|gif|jpe?g|bmp|js|inc)$ [NC]
RewriteRule ^/(.*)$1 [R=301,L]

Thanks for any tips.

Ian Evans

More information about the nginx mailing list