Welcome Guest, Not a member yet? Register   Sign In
How to remove index.php from codeigniter 2.0.2
#21

[eluser]mi6crazyheart[/eluser]
[quote author="appleboy" date="1313049439"]Could you try my solution above article?

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

This one is also not working...
#22

[eluser]Aken[/eluser]
My localhost install is kind of weird with RewriteBase - I haven't gotten it to work properly in subfolder installs of CI. I've needed to add the folder prefix to all my RewriteRules.

Try this .htaccess with the URI protocol set to AUTO first, and then the other flavors if auto doesn't work.
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

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

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

If THAT doesn't work, try this .htaccess and again go through the uri_protocol options (note the question marks in the RewriteRules):
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

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

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

Remember to put the .htaccess in the folder with your CodeIgniter install, NOT your root localhost folder (I assume you're already doing that, but just in case).
#23

[eluser]mi6crazyheart[/eluser]
@Aken Nops dude, these are also not working and ya, i'm using all these .htaccess in my codeigniter app folder.
#24

[eluser]caen[/eluser]
I also had some problems removing the index.php file. I eventually read the Apache docs and found out that I had to modify the AllowOverride directive inside httpd.conf to include "FileInfo". Give it a try. Also, don't forget to restart Apache :-)




Theme © iAndrew 2016 - Forum software by © MyBB