Search code examples
.htaccessmod-rewriteurl-rewritingdrupal-7wampserver

Rewrite 'http' into 'https' in url


how to use https://localhost/ instead of http://localhost/ ?

I am using WAMPSERVER 2.

Is there any way to rewrite http into https...?


Solution

  • Yes there is a way. Place this rule in your root .htaccess:

    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R=301,L]