I have a legacy site for a charity running on an old Apache 1.3 instance, behind Apache 2 running proxypass. When a request comes to example.com, Apache 2 sends it internally to localhost:8080 which works fine.
The problem:
example.com/blog/ works but example.com/blog (no trailing slash) does not. The URL it changes to in Chrome is example.com:8080/blog/ which doesn't exist.
The same is true for all other directories.
Apache 2:
<VirtualHost *:80>
ServerName example.com
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
Apache 1:
NameVirtualHost *:8080
<VirtualHost *:8080>
DocumentRoot /usr/www/html/
ServerName example.com
RewriteEngine on
RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)$
RewriteRule .* - [F]
</VirtualHost>
I thought a simple solution would be to add a rewriterule in either virtualhost but I've not had any success despite many attempts. I think a key issue is it's wrongly looking on example.com:8080 when the slash isn't there. It would be great if anyone can help me out, ask me any additional info that would be useful.