I'm renovating a legacy web app by replacing parts of it with Symfony.
My folder structure:
/symfony <---symfony install
/trunk <---document root
The document root is trunk/ so that changes to the legacy app are minimal.
In my Virtual Host Config I have:
<VirtualHost *:80>
ServerName webapp.example.com
DocumentRoot /path/to/project/trunk
Alias /ajax ../symfony/web
Alias /app_dev.php/ ../symfony/web/app_dev.php
</VirtualHost>
A request to webapp.example.com/ajax works
However a request to webapp.example.com/app_dev.php/ajax leads to a 404 error.
Note I need to rewrite only paths that start with /app_dev.php/, ie. include the trailing slash.