0
我已經使用這個代碼如何使用htaccess在某些頁面上啓用https也可以從Codeigniter中的URL中刪除index.php?
Options +FollowSymLinks
RewriteEngine on
# redirect for http /buy page
RewriteCond %{SERVER_PORT} =80
RewriteRule ^buy/?$ https://mysite.com/buy [R=301,QSA,L,NE]
# redirect for https non /buy pages
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_URI} !^/buy [NC]
RewriteRule ^/?(.*)$ http://mysite.com/$1 [R=301,QSA,L,NE]
這是工作的罰款HTTPS重定向,但我也想從我的URL.Here刪除的index.php是該代碼:
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]
如何我可以加入這兩個代碼嗎?請幫忙。
感謝魯尼:)它的工作... – Reetika 2013-02-20 11:22:11
@Reetika這是偉大的。這是我與我一起狂歡的標準幫手功能之一。 – Rooneyl 2013-02-20 11:29:43