CodeIgniter | 某些控制器不会加载,具体取决于.htaccess?

I have two controllers inside my CodeIgniter project. - home.php - dashboard.php

For some reason, my htaccess makes dashboard.php unavailable when I change it to this:

<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>

However, when I change it to the code below, home.php is unavailable.

<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>

I don't understand why, anyone have an idea of why it would do this?

Thanks, Scott

Try these:

 <IfModule mod_rewrite.c>

     Options +FollowSymLinks
     RewriteBase /ci_intro
     RewriteEngine On
     RewriteCond %{HTTP_HOST} !^www\.
     RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
     #Send request via index.php
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ index.php?/$1 [L]

    </IfModule>

And make controller home.php as class Home extends CI_Controller and Rename it as Home.php Same for dashboard.php