Check Rewrite and Update to /home?

mevans336 nginx-forum at nginx.us
Tue May 29 13:46:55 UTC 2012


Hi Javi,

Thank you, that appears to have worked perfectly.

Javi Lavandeira Wrote:
-------------------------------------------------------
> 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
> 
> On 2012/05/27, at 7:50, "mevans336"
> <nginx-forum at nginx.us> wrote:
> 
> > 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#ms
> g-226862
> > 
> > _______________________________________________
> > nginx mailing list
> > nginx at nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

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



More information about the nginx mailing list