CodeIgniter Forums
problem of remove index.php from uri - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: problem of remove index.php from uri (/thread-23192.html)



problem of remove index.php from uri - El Forum - 10-03-2009

[eluser]vantao[/eluser]
my project structure is:
----root-
-system-
-application
-cache
-...
-index.php

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?


thanks!


problem of remove index.php from uri - El Forum - 10-05-2009

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


problem of remove index.php from uri - El Forum - 10-05-2009

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

http://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html