about user friendly url configuration in url on local web server.

i m using windows xp and xampp for my local system. and i m having trouble configuring user friendly url in codeigniter.

i installed the codeigniter and i checked everything it worked fine. i created ci folder in web root of my server. so i can access it using

i created other controller helloworld for just checked and run using this.
and it worked like a charm.

but then i thought making it userfriendly would be better i wanted to make it like
so i from user guide i found this code.

RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

and put it in the ci directory where codeigniter is installed and then i set base url
from config file to

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

and then i try to run
but i got Error 404 from apache.

i try to change directory of htaccess to system directory of codeigniter. so i put htaccess file into root>ci>system but still it did not work.

i try to check weather mod_rewrite is enabled or not but it also enabled and working in other site. i believe i am missing something to be configure. so can anyone help me with the issue ?

You have to specify the RewriteBase if you install CI in a subdirecory.

Try the following .htaccess
RewriteEngine On
RewriteBase /countable_test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

thanks a ton for the answer..
problem solved.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.