Welcome Guest, Not a member yet? Register   Sign In
Can't remove index.php in the url in ci2.0?
#1

[eluser]chefnelone[/eluser]
Hello

In ci1.7 I use this code in .htaccess to remove index.php from the url: (but isn't working in ci2.0)

localhost/ci2/.htaccess
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteBase /ci2/
    

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>

    ErrorDocument 404 /index.php
    
</IfModule>

in application/config/config.php I have:

Code:
$config['index_page'] = '';

What more do I need to do?


Messages In This Thread
Can't remove index.php in the url in ci2.0? - by El Forum - 02-08-2011, 10:42 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 02-08-2011, 12:59 PM
Can't remove index.php in the url in ci2.0? - by El Forum - 02-08-2011, 03:52 PM
Can't remove index.php in the url in ci2.0? - by El Forum - 02-09-2011, 02:04 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 04-13-2011, 09:49 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 04-18-2011, 12:41 PM
Can't remove index.php in the url in ci2.0? - by El Forum - 05-22-2011, 12:20 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 05-22-2011, 04:00 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 05-22-2011, 04:06 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 05-23-2011, 06:58 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 08-20-2012, 01:42 AM
Can't remove index.php in the url in ci2.0? - by El Forum - 08-20-2012, 11:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB