I am using snow leopard and I have my local environment and I am trying to get rid of the index.php in the url…here is what i have
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]
My config file has this
$config['index_page'] = "";
But when i visit the page without index.php it doesnt work
this works
http://localhost/ci_example/index.php/site
this doesnt
http://localhost/ci_example/site
I tried to follow this
maybe i need to do something with my local conf file…but i really dont know what and i have no idea how to restart apache command line…any ideas
What do you mean when you say “it doesn’t work”? Do you get an error? A white screen? A 500 error?
Did you make sure your httpd.conf file has the
AllowOverridesetting set toAll? If not, it may not be using your .htaccess file, meaning the rewrite rules won’t be used.