Rewrite https to http expect one location

basti black.fledermaus at arcor.de
Mon Feb 24 15:10:24 UTC 2014


Hello,
I have a config like:

server {
 ...
 # do not rewrite this
 location /mailadmin/(.*.\.php)$ {
       # some stuff
 }
 
 location / {
      # some other stuff
      
      rewrite ^ http://$server_name$request_uri? permanent;
 }
 
 location ~ \.php$ {
        # php stuff;
 }
}

URLs like
https://example.com/mailadmin/test.php?ps=301A1123344556E925803435&framework=
are partly rewrite.

Regards,
Basti



More information about the nginx mailing list