Reputation: 60
I want to remove index.php from url while accessing controller.
This is the current working url : http://localhost/jplugins/index.php/home/index/
But it gives error(404 Page Not Found) when i access using url : http://localhost/jplugins/home/index/
Here are the things i tried while searching over stackoverflow :
1. set $config['index_page'] = "";
in config/config.php
2. place .htaccess , I have tried every htaccess file i found in threads.. none work
3. enable rewrite module in xampp
4. set $config['base_url'] = 'http://localhost/jplugins/';
didnt work either
5. Reinstall Xampp. No change
6. change $config['uri_protocol'] = 'AUTO';
. I have tried every method listed in comment but it only gives home/index output no matter what the query is, like http://localhost/jplugins/asdwhadsadasdasdasdadas/asdasda//asdad
--> will give same output as http://localhost/jplugins/index.php/home/index/
.
Lastly i sent my whole code to someone who was also using xampp. It worked there perfectly. Using same xampp version 3.2.1( May 7th 2013).
I'm using windows 7 32bit.
What could be the problem here?
Upvotes: 1
Views: 1924
Reputation: 131
Create a .htaccess
file in your jplugins
directory and add the following code:
RewriteEngine On
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Upvotes: 1