私の既存のものは私のURLから完全に.htaccess
削除されます:index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index\.php|(.*)\.swf|images|robots\.txt|css|docs|cache)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 /application/errors/404.php
</IfModule>
.htaccess
サイト全体をSSLで実行する必要があり、ホスティング会社のPagoda Boxには、に切り替えるための独自の編集http
がありhttps
ます。
RewriteCond %{HTTP:X-Forwarded-Proto} = http
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
これは、最初の条件ステートメントの最後に追加された場合にのみ機能し、その時点で完全に機能します。つまりhttps
、ネイキッドURLに追加し、を削除しindex.php
ます。
ただし、アドレスバーでs
fromを選択して削除すると、が戻ってきて、URLの最後のセグメントが繰り返されます。で始まる完全なURLを入力すると、リダイレクトされて完全に機能します。カーソルをの前に置いて削除した場合にのみ、サイトが壊れます。https
index.php
http://
s
この新しい条件とルールが既存のファイルと競合しないようにする方法についてのアイデアはありますか?