質問

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

役に立ちましたか?

解決

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

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top