When I navigate to http://example.com
it correctly redirects to https://example.com
.
The problem I'm having is that when I navigate to http://example.com/sub/directory/page.htm
it redirects to https://example.comsub/directory/page.htm
.
Why is it not redirecting to https://example.com/sub/directory/page.htm
?
Here is the apache config:
<VirtualHost *:80>
ServerName example.com
Redirect permanent / https://example.com/
</VirtualHost>
<IfModule mod_ssl.c>
#NameVirtualHost *:443
<VirtualHost *:443>
ServerName example.com
[...]
ProxyRequests Off
ProxyPass / http://localhost:8444/
ProxyPassReverse / http://localhost:8444/
</VirtualHost>
The Apache version I am using:
Server version: Apache/2.4.18 (Ubuntu)
Server built: 2017-09-18T15:09:02