• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
routes issue

hi guys
i m a novice。

i just create a simple project,add some controllers according to demo,

but when running,codeigniter cant handle the request except the default_controller ,"http://localhost:81/"

if some url like " http://localhost:81/team",error 404 appeared,but not the default error_404 page,

but if change the .htaccess file to:

RewriteEngine on

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

everything work fine.

so my question is whether i must change the .htaccess file when work with codeigniter,if not,where is the why.

sorry,english is not my mother language.

thanks for you.

If you can't use an .htaccess file (or some other method of URL rewriting), you have to include the index.php portion in your URL.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.