Maulik patel
Maulik patel

Reputation: 1601

.htaccess not working in LAMP

i used CI, i downloaded project from server it has a .htaccess file. when i run these project in my localhost is not working, i have to put index.php after project path , like example.com/index.php/controller/method. there is read/write rule in .htaccess file. for run .htacces i use these much but still not working. In /etc/apache2/sites-available/default modify the line containing AllowOverride None to read AllowOverride All. and then restart apache. for check read/write rule enable or not i run a2enmod rewrite it's shows Module rewrite already enabled. so, how can i run .htacess file, i want to remove index.php from URL in my CI from localhost.

Upvotes: 0

Views: 868

Answers (1)

Ramesh
Ramesh

Reputation: 406

Add the following to the .htaccess file and keep the file in your document root

DirectoryIndex index.php

Upvotes: 2

Related Questions