1

我创造了以下条件:

DirectoryIndex index.php
RewriteEngine on

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/(shop|delivery-checkout|delivery-order|delivery-offer|confirm-sms-code|show-delivery-product|auto-search-product|add-product|update-product|remove-product|destroy-cart|get-cart|cuisine|og-shop) [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond %{HTTPS} on 
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/ [R=301,L]

RewriteCond $1 !^(index\.php|robots\.txt|website|shop_files|shop_list|client|favicon\.ico|style\.css|sitemap.xml)
RewriteRule ^(.*)$ ./index.php?/$1 [L]

AddCharset utf-8 .js

我基本上想做的是检查 URL 中是否不存在(https)。
因此,除了引用的 URL,将其重写为https://www.

注意:我正在 iframe 中加载这些 url:domain.com/shop、domain.com/delivery-checkout、domain.com/delivery-order,这就是为什么我希望那些被排除和安全的原因取决于父站点。

我究竟做错了什么?

4

1 回答 1

1

用这个改变你的代码:

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/(shop|delivery-checkout|delivery-order) [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
于 2013-02-21T19:49:05.927 回答