Welcome Guest, Not a member yet? Register   Sign In
Apache 404 Error when removing index.php from URL
#1

[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
#2

[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?
#3

[eluser]daweb[/eluser]
Hi Ben,

try to post here your .htaccess file.

Regards
#4

[eluser]Ben Hayman[/eluser]
Here it is:
Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
#5

[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>
#6

[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.




Theme © iAndrew 2016 - Forum software by © MyBB