Force HTTPS to HTTP via .htaccess

Last updated on June 26th, 2022 at 11:41 am

Sometimes, instead of forcing https for all http pages on your site, it is necessary to revert your https enabled links back to http. In that case, you can use the following .htaccess rule to switch from https to http through your .htaccess file:

#Force HTTPS to HTTP
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

Leave a Reply

Your email address will not be published. Required fields are marked *