我试图让我的网站所需的所有https路由到http除外/商店
在我的.htaccess中使用以下代码,但它无效:
#redirect all https traffic to http, unless it is pointed at /shop
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/shop/?.*$
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L]
托管在rackspace云站点上。
.htaccess中的其他代码
RewriteEngine on
RewriteBase /
# Shop rewrite rule + remove trailing slash
RewriteRule ^shop\/(.*)/$ shop/$1 [R=301,L]
RewriteRule ^shop\/([A-Za-z0-9-/]+)$ shop.php?shop=$1 [NC,L,QSA]
DirectoryIndex index.php index.html index.htm