CodeIgniter Forums
Those with .htaccess problems, removing index.php SOLVED - 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: Those with .htaccess problems, removing index.php SOLVED (/showthread.php?tid=10535)



Those with .htaccess problems, removing index.php SOLVED - El Forum - 08-03-2008

[eluser]LifeSteala[/eluser]
Hi guys. This is a thread to say after so long I got my .htaccess file working brilliantly.

Thought I would post this up as I saw a lot of other threads where others were having the same problem, unsolved. I'm sure this will fix it.

I needed to add

Code:
Options FollowSymLinks

and it all started working.

My htaccess file:

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

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

I hope this helps with anyone having the same problem.


Those with .htaccess problems, removing index.php SOLVED - El Forum - 01-19-2009

[eluser]Mat-Moo[/eluser]
Yea, first one that has worked correctly for me... ALMOST. Had to change "RewriteRule ^(.*)$ index.php?/$1 [L]" for Apache 2.


Those with .htaccess problems, removing index.php SOLVED - El Forum - 01-19-2009

[eluser]Adam Griffiths[/eluser]
Be careful when using this if symlinks are turned on already, because it will result in a 500 error.