Question

I have a large number of pages I would like to force to be http instead of https the code i currently have is:

RewriteEngine On

RewriteCond %{HTTPS} =on

RewriteRule ^$ http://mydomain.com [R=301,L]

How would I add a wildcard redirect to this? maybe

RewriteRule ^$ http://mydomain.com/category/* [R=301,L]

It's on a WordPress site if that makes any difference?

Cheers

Was it helpful?

Solution

RewriteEngine On
RewriteCond %{HTTPS} =on
RewriteRule (.*) http://%{HTTP_HOST}/$1 [R=301,L,QSA]

This will redirect https://hostname/* to http://hostname/*

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top