Welcome! Log In Create A New Profile

Advanced

Overriding default 'missing trailing slash' behavior

Melvyn Sopacua
December 24, 2009 11:30AM
Hi,

Is there a way to override the default behavior of how nginx handles directory
redirecting?
At present is does the equivalent of:
rewrite $scheme://$first_server_name/$request_uri/ permanent

I tried overriding:
location = /software {
root /path/to/webroot
rewrite $scheme://$http_host/software/ redirect;
}

But it doesn't even get there, as the log shows a 301 rather then a 302 with
the wrong host.
This is a problem for me, as the same site should be accessible from within
and outside the network, using different hostnames. Two of these hostnames
don't exist outside the network.
--
Melvyn Sopacua

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Overriding default 'missing trailing slash' behavior

Melvyn Sopacua December 24, 2009 11:30AM

Re: Overriding default 'missing trailing slash' behavior

Maxim Dounin December 24, 2009 12:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 132
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready