Hi, if i have a url ending with a / how can i rewrite the request before
go to the proxy so the ending slash is dropped?
i want www.host.com/uri/ to be www.host.com/uri
Posted at Nginx Forum:
Hi, if i have a url ending with a / how can i rewrite the request before
go to the proxy so the ending slash is dropped?
i want www.host.com/uri/ to be www.host.com/uri
Posted at Nginx Forum:
budala10 wrote:
Hi, if i have a url ending with a / how can i rewrite the request before go to the proxy so the ending slash is dropped?
rewrite ^(.*)/$ $1;
This is because in nginx you cannot substitute part of the url. The
replacement string is always considered as a whole new url. So this will
not work:
rewrite /$ “”; # DOESN’T WORK
Tobia
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs