How to Force HTTPS Using the .htaccess

Redirect All Web Traffic

To force all web traffic to use HTTPS insert the following lines of code in the .htaccess file in your website's root folder.

NOTE: If you have existing code in your .htacess, add this above where there are already rules with a similar starting prefix.

 RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

?האם התשובה שקיבלתם הייתה מועילה

0 משתמשים שמצאו מאמר זה מועיל