Apache 404 Error when removing index.php from URL |
[eluser]Ben Hayman[/eluser]
I'm having a problem with removing the "index.php" part in the the url of my application. I am following the instructions in the user guide for how to do this and I get an Apache 404 error whenever I try to go to http://locahost/benhayman/ (This is my alias) Code: The requested URL /index.php/ was not found on this server. I have checked and I have the mod_rewrite module loaded. But when I don't try to do this it works fine. I am running WAMPServer with Apache 2.0.61 and PHP 5.2.5
[eluser]Ben Hayman[/eluser]
OK - I sort of solved it myself, but now I've run into another problem. I can go to the base url and it loads fine, but when I navigate to another controller the page doesn't load: Code: http://localhost/benhayman/blog ...leads to... Code: The requested URL /index.php/blog was not found on this server. However, if I call the index.php explicitly the page loads: Code: http://localhost/benhayman/index.php/blog Can anyone help me out?
[eluser]daweb[/eluser]
Hi Ben, try to post here your .htaccess file. Regards
[eluser]Ben Hayman[/eluser]
Here it is: Code: <IfModule mod_rewrite.c>
[eluser]daweb[/eluser]
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /benhayman/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,L] </IfModule>
[eluser]Sherz[/eluser]
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /benhayman/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,L] </IfModule> Should work. |
Welcome Guest, Not a member yet? Register Sign In |