.htaccess 强制将https重定向到http(主域指向子文件夹)

.htaccess 强制将https重定向到http(主域指向子文件夹),.htaccess,mod-rewrite,.htaccess,Mod Rewrite,我的htacess文件中有: RewriteEngine on RewriteCond %{HTTP_HOST} ^(staging.)?example.com$ RewriteCond %{REQUEST_URI} !^/staging/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /staging/$1 RewriteCond %{HTTP_HOST} ^

我的htacess文件中有:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(staging.)?example.com$
RewriteCond %{REQUEST_URI} !^/staging/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /staging/$1
RewriteCond %{HTTP_HOST} ^(staging.)?example.com$
RewriteRule ^(/)?$ staging/index.php [L]
如何将所有https请求强制发送到http?

类似于:

RewriteCond %{HTTPS} /on/
RewriteRule ^(.*)$ http://hostname/$1 [L,R]

该规则必须是从HTTPS切换到HTTP的重定向。

在现有规则之上或之下的何处添加该规则?我将使其成为第一个立即将HTTPS跳转到HTTP的规则。然后HTTP请求将跳过它并命中现有规则集。