Url rewriting .htaccess将一个文件夹重写为http-将所有其他文件夹重写为https

Url rewriting .htaccess将一个文件夹重写为http-将所有其他文件夹重写为https,url-rewriting,Url Rewriting,目前,我有一个http重写规则,可以将所有http请求更改为https。我希望在一个特定文件夹上执行相反的操作(将该文件夹的所有请求更改为http),但我还希望将该http文件夹的子文件夹重写为https 这是我当前的.httaccess文件: RewriteEngine on RewriteCond %{REQUEST_URI} ^/HTTP_FOLDER/* #want http on parent RewriteCond %{REQUEST_URI} !^/HTTP_FO

目前,我有一个http重写规则,可以将所有http请求更改为https。我希望在一个特定文件夹上执行相反的操作(将该文件夹的所有请求更改为http),但我还希望将该http文件夹的子文件夹重写为https

这是我当前的.httaccess文件:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/HTTP_FOLDER/*          #want http on parent
RewriteCond %{REQUEST_URI} !^/HTTP_FOLDER/HTTPS_SUBFOLDER/**    #want https on sub folder
RewriteRule ^(.*)$ "http\:\/\/mysite\.com\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]         #all others rewrite to https
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$
RewriteRule ^(.*)$ "https\:\/\/mysite\.com\/$1" [R=301,L]

我认为它实际上是工作的张贴。我的机器上缓存了一些东西。我在其他几台电脑上试用过,它似乎能正常工作。

我想它确实能正常工作。我的机器上缓存了一些东西。我在其他几台电脑上试过,它似乎能工作