Yeees

.ml

Information

So I made a website, but when I’m trying to use the .htaccess file it won’t work. I have placed it in the right spot (grap.ml/htdocs/.htaccess). All the code I have in it is:

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

What doesn’t it do? From the looks of it, it should redirect the page to https. It works for me. Try clearing your cache?

1 Like

Here, try this code instead:

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
4 Likes

Just to say, we do not remove topics on request, your question and its answers will help someone in future.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.