I'm working with WAMP on Windows 7. Every time I try to create a Virtual Host to work with "clean" URLs for a Symfony2 project, I get 404 errors.
Here's my httpd.conf:
NameVirtualHost localhost
<VirtualHost localhost>
DocumentRoot "D:/Documents/wamp/"
ServerName localhost
</VirtualHost>
<VirtualHost my-project.local>
ServerName my-project.local
DocumentRoot "D:/Documents/wamp/my-project/web/"
DirectoryIndex app.php
<Directory "D:/Documents/wamp/my-project/web/">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
My hosts file:
127.0.0.1 my-project.local
When I try to reach http://my-project.local, I get a Symfony 404 error. When I check with http://my-project.local/app.dev, I'm redirected to http://my-project.local so I also get a 404 error and finally, when I try to reach http://my-project.local/app_dev.php, the correct page is loaded but with absolutely no CSS.
I also tried to replace DirectoryIndex app.php
with DirectoryIndex app_dev.php
but I still get 404.
I don't have any issue when I create Virtual Hosts for other projects powered by Laravel for example.