Answers for "does htaccess work on localhost"

6

enable https://www htaccess

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Posted by: Guest on July-16-2020
1

htaccess http to https://www

RewriteOptions inherit
RewriteEngine On

<IfModule mod_rewrite.c>
	RewriteCond %{HTTPS} off
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
	
	RewriteCond %{HTTP_HOST} !^www\. [NC]
	RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

#IfModule is required
Posted by: Guest on May-19-2022

Code answers related to "does htaccess work on localhost"

Browse Popular Code Answers by Language