0
我有我的笨項目中兩個控制器。 - home.php - dashboard.phpCodeIgniter |某些控制器不會根據.htaccess加載?
出於某種原因,我的htaccess使得dashboard.php不可當我把它改成這樣:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ci_intro/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L] # THIS LINE HERE
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
然而,當我將其更改爲下面的代碼, home.php不可用。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ci_intro/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] # THIS LINE HERE
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
我不明白爲什麼,任何人都知道爲什麼會這樣做?
感謝, 斯科特
你能告訴你的控制器和文件結構的屏幕截圖? – zJorge
嘗試,將home.php重命名爲Home.php –