Check Rewrite and Update to /home?

mevans336 nginx-forum at nginx.us
Sat May 26 22:50:25 UTC 2012


Hello Gents,

Right now, we catch all http://www.domain.com requests and do a simple
rewrite to https://www.domain.com. I would like to update this re-write
to point to https://www.domain.com/home.

Here is my server section for the non-SSL (http) server:

server {
        listen          192.168.1.1:80;
        server_name     www.domain.com;
        location / {
                add_header X-Frame-Options SAMEORIGIN;
                proxy_set_header Host $host;
                proxy_set_header  X-Real-IP  $remote_addr;
                proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
                proxy_next_upstream error timeout invalid_header;
                rewrite ^ https://$server_name$request_uri? permanent;
        }
}

How should I modify the rewrite statement to point to /home? My
Google-Fu is failing me.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,226862,226862#msg-226862



More information about the nginx mailing list