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:
Hi,
How about changing this:
rewrite ^ https://$server_name$request_uri? permanent;
To this:
rewrite ^ https://$server_name/home$request_uri? permanent;
I haven’t tried this yet, but I’m going to need something similar for a
project I’m working on. Let me know how it works.
Regards,
–
Javi Lavandeira
http://www.lavandeira.net
Here is my SS: 259 71 2451
Hi Javi,
Thank you, that appears to have worked perfectly.
Javi Lavandeira Wrote:
permanent;
http://www.lavandeira.net
to point to https://www.domain.com/home.
proxy_set_header Host $host;
[email protected]
nginx Info Page
nginx mailing list
[email protected]
nginx Info Page
Posted at Nginx Forum: