【发布时间】:2013-02-07 06:51:05
【问题描述】:
我创建了以下条件:
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)。
所以除了引用的网址,改写成https://www.
注意:我正在 iframe 中加载这些网址:domain.com/shop、domain.com/delivery-checkout、domain.com/delivery-order 和这就是为什么我希望那些被排除和安全的原因取决于父站点。
我做错了什么?
【问题讨论】:
标签: .htaccess codeigniter codeigniter-2