Mobile app version of vmapp.org
Login or Join
Gretchen104

: Problem with http to https redirect I have the following .htaccess file (in www.example.com/folder1/folder2) RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

@Gretchen104

Posted in: #Htaccess #Https

I have the following .htaccess file (in example.com/folder1/folder2)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI} [R,L]


to map any HTTP request in folder2 to the corresponding HTTPS request.

This all works fine, but if I try to access
www.example.com/folder1/folder2

then I get to a


"This web page is unavailable" ERR_NAME_NOT_RESOLVED error page.


But
www.example.com/folder1/folder2 www.example.com/folder1/folder2/

both work fine (and end up displaying www.example.com/folder1/folder2/index.phtml as expected)

I don't understand why the HTTPS version doesn't work when there is no / at the end of the URL.

Can anyone explain and provide a fix?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme