How to remove index.php in url? |
[eluser]Bhashkar Yadav[/eluser]
Go to application/config/config.php Update code Code: $config['index_page'] = 'index.php'; Quote:$config['index_page'] = '';around line number 29. Create .htaccess file with Code: # .htaccess file
[eluser]Matteo[/eluser]
Great reply, just 1 question... Do you replace the .htaccess file in the CI/system folder or somewhere else? The one in the CI folder just says "deny from all". I don't want to screw anything up.
[eluser]CroNiX[/eluser]
No, don't touch the .htaccess in /system or /application. Those directories are not supposed to be accessed via the url, which is why those rules are there. You need to create a new .htaccess and it should be located in the same directory that index.php is located. This is also covered in the User Guide, although their sample .htaccess is a bit of an older version (it should still work ok).
[eluser]timpiele[/eluser]
I have done both of these things but I still get the error: *********************************************************************** Not Found The requested URL /index.php/engines was not found on this server. Apache/2.2.3 (CentOS) Server *********************************************************************** If I go to : /index.php/engines I can see the page. |
Welcome Guest, Not a member yet? Register Sign In |