Trouble with redirects from backend

Rainer Duffner rainer at ultra-secure.de
Sun Feb 12 00:26:51 UTC 2017


Hi, 

I have typo3 with nginx running behind an nginx reverse-proxy, mapped to a subdirectory.

So, it's www.company.bla/ourtypo3site.

Typo3 has RealURL extension installed and that adds a "slash" at the end if it's not sent by the browser - this is done via a redirect.

The trouble is that when this redirect is issued, the nginx reverse proxy turns it into a redirect into the main site.

www.company.bla/ourtypo3site/some/page

turns into
www.company.bla/some/page

I have the following configuration for nginx on the reverse proxy:


        location /ourtypo3 {
                include proxy.conf;
                proxy_set_header HTTPS on;
                proxy_pass http://ourtypo3:80/;
		# http://serverfault.com/questions/444532/reverse-proxy-remove-subdirectory
        }


How can I fix this?

At first, I tried hard-coding the redirects on the reverse-proxy. But that's a lot of work and not really a solution.

nginx 1.10



Regards
Rainer


More information about the nginx mailing list