CodeIgniter Forums
index.php - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: index.php (/thread-54443.html)

index.php - El Forum - 09-08-2012

what is the right way of removing the index.php from urls?

index.php - El Forum - 09-08-2012

edit the .htaccess

and try these codes,
<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 !mod_php5.c>
        RewriteRule ^(.*)$ index.php?/$1 [L]