Home forword btn Jai Singh forword btn How to Redirect Http to Https using Htaccess Without WWW

Jai Singh How to Redirect Http to Https using Htaccess Without WWW

How to Redirect Http to Https using Htaccess Without WWW

How to Redirect Http to Https using Htaccess Without www

Now we are explain how to redirect website http to https using htaccess file, we are explain step by step you can learn easily.

Now you can create .htaccess file and put the code above…

# redirect website http to https without www

RewriteEngine On

RewriteCond %{HTTPS} off [OR]

RewriteCond %{HTTP_HOST} ^www\. [NC]

RewriteRule ^ https://example.com%{REQUEST_URI} [L,NE,R=301]

RewriteCond %{HTTPS} off

RewriteCond %{HTTP:X-Forwarded-SSL} !on

RewriteCond %{HTTP_HOST} ^example\.com$

RewriteRule ^/?$ "https\:\/\/example\.com\/" [R=301,L]

 

After you htaccess file and upload your root domain….enjoy it…thanks…

Tags: how to force redirect http to https using htaccess, redirect http to https using htaccess without www

  • Submit Date7 months ago
  • CategoryPHP
  • 11
  • ';
  • Comment0

Leave Your Comment

Login to post a comment