Neeraj
Neeraj

Reputation: 9155

Symfony Error The server returned a 404 Not Found

I am new to Symfony.

I just installed Symfony 2.3.2 by following instruction given at http://symfony.com/doc/current/book/installation.html for windows.

When i open

http://localhost/Symfony/web/

then i get error given below

Oops! An Error Occurred

The server returned a "404 Not Found".

However if i run

http://localhost/Symfony/web/app-dev.php

then i get the Welcome page of Symfony.

What settings i need to change to point

http://localhost/Symfony/web/app-dev.php

by calling

http://localhost/Symfony/

Upvotes: 3

Views: 20328

Answers (3)

voghDev
voghDev

Reputation: 5791

I was having the same and my problem was dumber. I configured the whole Symfony project, and restarted apache for the changes to take effect, doing this (WRONG):

service apache2 stop
service apache2 start

which did not take effect, as I was a regular user. Had to do (RIGHT):

sudo service apache2 stop
sudo service apache2 start

Then my /app_dev.php started working and website loading

Upvotes: 0

rpg600
rpg600

Reputation: 2850

Update .htaccess in web directory like this :

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ app_dev.php [QSA,L]
</IfModule>

/ will redirect to /app_dev.php

Upvotes: 3

user2615609
user2615609

Reputation:

Look here: symfony2 - how to switch from "dev" to "prod"?

You don't have to redirect to app_dev.php because it will work as soon as you create your first bundle/route.

Upvotes: 1

Related Questions