我使用codeigniter和我使用重定向所有網址https。現在我只想將一個頁面(https://www.example.com/campaign/PPRTasshs-dhshs_fd5656dfhdh/web/surf)重定向到http。重定向只有一個頁面http htaccess
我在那裏得到了很多答案。但我無法正確實施。每次我收到錯誤「這個網頁有一個重定向循環」。
我的htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# the subsequent rule will catch it.
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{SERVER_PORT} 443
RewriteCond $1 (web\/surf|surf)
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^about-us/[L,R=301]
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
鏈接上,這樣我試過,但不是爲我工作。
Codeigniter: Check and force one page to https://
Redirect single page http to https
在此先感謝
謝謝@paresh-thummar ..它的工作..再次感謝 – user1673762 2014-10-11 10:44:52