Force https

The link above shows how to redirect all traffic to https but i don’t have the permission to modify the .htaccess file on the server. can anyone help?

Most likely you are editing the wrong file. Perhap a screenshot of directory will give a clearer picture


You need to edit the .htaccess file in the /htdocs direcotry.


You need to edit the .htaccess inside the htdocs folder, try editing via FTP, it should work.

I use this on mine to force https:

Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Is that the file that says DO NOT EDIT THIS FILE at the top? And did you read it and determine that that’s the file you should be editing?


Sorry, I was trying to edit the file in the root directory.
It works now, thanks!!

1 Like

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