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
10 months ago
PHP
- 11
';
0



RECENT POSTS
CATEGORIES
Copyrights © 2021 SoftechBharat. All Rights Reserved.
Leave Your Comment
Login to post a comment