htaccess redirect https to http – To redirect from HTTPS to HTTP on the home page only using the following rule. OR Redirecting your domain from https to http using .htaccess in cPanel.
htaccess redirect https to http
Force your site to load securely with an .htaccess file To redirect your website from HTTPS to HTTP, add the following rule in your website’s .htaccess file:
Forcing HTTPS on a Specific Domain
Let’s say that you have two domains: http://infinityknow.com and http://pakainfo.com.
RewriteEngine On RewriteCond %{HTTP_HOST} ^infinityknow.com [NC] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Forcing HTTPS on a Specific Folder
The .htaccess file can also be used to force HTTPS on specific folders.
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(admin|user|api) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
redirect http to https htaccess
htaccess redirect to https
RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^pakainfo\.com [OR] RewriteCond %{HTTP_HOST} ^www\.pakainfo\.com RewriteRule .* https://pakainfo.com%{REQUEST_URI} [R=301,L]
redirect to http to https .htaccess
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
redirect http to https htaccess
#htaccess RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
don’t Miss : SSL forcefully Redirect HTTP to HTTPS Using .htaccess File
htaccess redirect https to http
RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
.htaccess redirect to https
.... .... # Redirect To HTTPS RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\. [NC] RewriteRule ^ https://domain-name.com%{REQUEST_URI} [L,NE,R=301] ... ...
redirect htaccess http to https
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain-name.com/$1 [R,L]
I hope you get an idea about htaccess redirect https to http.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.