CodeIgniter Forums
Missing slash (server 404) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Missing slash (server 404) (/showthread.php?tid=2717)



Missing slash (server 404) - El Forum - 08-21-2007

[eluser]Unknown[/eluser]
Hi,

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|web|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Aplication reside in http://host.com/ci directory
It works fine on my localhost, but on normal server i cannot use http://host.com/ci - i have to use (otherwise getting server 404) - http://host.com/ci/ (slash added).
I spent over 2 hours trying resolve this problem with .htaccess and reading topics here :|
Maybe someone had similar problem?

best regards
(sorry for my english)


Missing slash (server 404) - El Forum - 08-21-2007

[eluser]coolfactor[/eluser]
I use the following:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

You might want to try it to see if your problem goes away. Your approach has other advantages you may want to hang on to, but at least this might help you narrow down the problem.


Missing slash (server 404) - El Forum - 08-21-2007

[eluser]Unknown[/eluser]
Thank You. It works Smile