重定向到索引Codeigniter

时间:2014-11-19 03:09:00

标签: codeigniter-2

我遇到重定向问题。 如何将localhost / volleyball重定向到localhost / volleyball / index.php? 因为它显示我的目录,我希望它指向index.php。顺便说一下,我正在使用Codeigniter2.2

这是我的.htaccess:

  <IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /volleyball/
   RewriteCond %{REQUEST_URI} ^system.*
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]

1 个答案:

答案 0 :(得分:1)

我得到了答案,我补充道:

DirectoryIndex index.php