CodeIgniter Forums

Full Version: index.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Captain_Fluffy_Pants[/eluser]
what is the right way of removing the index.php from urls?

El Forum

[eluser]solid9[/eluser]
edit the .htaccess

and try these codes,
Code:
<IfModule mod_rewrite.c>

    Options +FollowSymLinks
    RewriteEngine on

    # NOTICE: If you get a 404 play with combinations of the following commented out lines
    #AllowOverride All
    #RewriteBase /yourbase

        RewriteCond $1 !^(index\.php|images|robots\.txt)

    # Send request via index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    <IfModule mod_php5.c>
        RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>

    <IfModule !mod_php5.c>
        RewriteRule ^(.*)$ index.php?/$1 [L]
    </IfModule>

</IfModule>