Welcome Guest, Not a member yet? Register   Sign In
Get some problem after remove index.php in URL !
#1

[eluser]blooapple[/eluser]
XAMPP
.htaccess in the forbidden dolder[/b]
I use these line in .htaccess file to get rid of index.php

Code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Code:
$config['base_url']    = "http://localhost/ci/";
$config['index_page'] = "";

When i access http://localhost/ci/ instead of http://localhost/ci/index.php/blog/
It's fine, everything works properly !
However when i access another page like About page URL:
http://localhost/ci/blog/about or another page besides homepage !
It's said the object was not found !

Then i restore the indexpage value:
Code:
$config['base_url']    = "http://localhost/ci/";
$config['index_page'] = "index.php";

Everything backs to normal but then the other pages besides homepage comeback with index.php in URL.
http://localhost/ci/index.php/blog/contact

How can i get access normally with these URL
Code:
http://localhost/ci/blog/about/
http://localhost/ci/blog/service/
http://localhost/ci/blog/contact/
...

This messy thing has caused me another problem with pagination Sad too!
I'm getting headache with these URL ! Hope you guys can help me get out of this problem !
Thanks in advanced !
#2

[eluser]blooapple[/eluser]
Help me guys, i have no time ! I have to finish this immediately !
I have been reading a lot of thread about this problem and also the wiki. But it seems nothing like this !
Some more info:
mod_rewrite : ON
OS: XP SP2
.htaccess only work with homepage !
#3

[eluser]tomcode[/eluser]
Try to set RewriteBase in the htaccess file
Code:
RewriteEngine on
RewriteBase /ci/

Search forum and wiki, there're loads of info on it.
#4

[eluser]blooapple[/eluser]
Really thank you ! I figure it out ! i did exactly what wiki said before including your advise but there is some problem with my apache. I restart it but it didn't have any effect. After a day, i turn my computer on, it's working! This apache problem took me 6h ! LOL !

Thank you once again ! This thread is closed !




Theme © iAndrew 2016 - Forum software by © MyBB