コントローラーを使用するか、実際のフォルダーに移動するかの間で、CI はどのように活用しますか?
URL がある場合:http://localhost/sencha/touch/
同じ名前のコントローラーメソッドとフォルダーがあります(ただし、インデックスファイルはありません)。私のApacheサーバーは、コントローラーメソッドに行く代わりに、フォルダーのディレクトリリストを提供します(これにより、適切なインデックスファイルが提供されます)。
もう少しコンテキスト:
codeIgniter アプリと、sencha Touch アプリケーション、Ext JS アプリケーション、シエスタ テストがあります。
次のようなフォルダ構造:
-application
-config
-controller
-sencha.php
methods:
touch()
touch-siesta()
ext()
ext-siesta()
-some_other_controllers...
-model
-view
-template
-some_other_views....
-... other CI folders ...
-css
-js
-sencha
-touch
app -> with the sencha mvc structure
-touch-siesta -> with the siesta stuff
-ext
app -> with the sencha mvc structure
-ext-siesta -> with the siesta stuff
-system
-index.php
次の URL では、コントローラー メソッドを使用する代わりに、すべてディレクトリ リストが表示されます。
http://localhost/sencha/touch/
http://localhost/sencha/touch-siesta/
http://localhost/sencha/ext/
http://localhost/sencha/ext-siesta/
アップデート:
書き換え条件に次の行がありました。
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
有効なディレクトリかどうかを確認する行をコメントアウトしました。