Rewriting https to http

ianevans at digitalhit.com ianevans at digitalhit.com
Fri Jan 12 00:26:44 MSK 2007


Greetings.

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 ^/(.*) http://www.example.com/$1 [R=301,L]

Thanks for any tips.

-- 
Ian Evans






More information about the nginx mailing list