Welcome Guest, Not a member yet? Register   Sign In
problem of remove index.php from uri

my project structure is:

my .htaccess is:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

while i put .htaccess with the same level with system folder and index.php,it returned nothing.while i check the access.log,there is a 404 message. then i put .htaccess under system folder,the same level with application folder, it works,but only to index.php,while i'm trying to access other target without typing index.php in uri, i got a 404 message too.

what's wrong?anyone help me?


[eluser]Damien K.[/eluser]
Looks good to me (for a "properly" setup Apache), but every environment has its "quirks". Maybe whatever you're typing after index.php (ie, $1) does not exists in CI? If that doesn't work, I think the best place for resources for this problem is to search this forum (in addition to the manual) -- I've seen posts that address various .htaccess issues.

Make sure your server has mod_rewrite available. Here's a link that shows an exercise to help you determine that:


Theme © iAndrew 2016 - Forum software by © MyBB