index.php
CI URL 全体から削除する方法を取得します。以下はうまくいきます:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /crm/v2/index.php?/$1 [L]
ただし、ライブ サイトの他のコードに干渉します。追加するこの新しい CI バージョンは、という名前のサブディレクトリにありますv2
。したがって、レイアウトは次のようになります。
-originalDir
--v2
-otherDirs
-.htaccess
-etc...
したがって、本質的に URL は次のようになります。
// Original page
https://www.site.com/originalDir/somepage.htm
// And this exist too
https://www.site.com/originalDir/index.php
// My new stuff
https://www.site.com/originalDir/v2/index.php/controller/etc...
// Desired effect withOUT affecting the original sites index.php page
// aka, the below is what i WANT but NOT getting!
https://www.site.com/originalDir/v2/controller/etc...
私は多くの言語でコーディングできますが、これらの htaccess の書き換えに関する経験はあまりありません。codeigniter サブディレクトリのみの index.php を書き換える方法についてのアイデアはありますか? ローカルでは機能するように見えるいくつかのことを試しましたが、ライブサーバーでは機能しません。書き換えコードの正確な構造がわからない。