If you’re using mod_rewrite and mod_alias you may have a small issue getting the rewrites to work correctly (404, no rewrite, wrong site showing). I recently installed a cakephp app in an aliased directory – the pertinent line from /etc/apache2/sites-enabled/000-default (or equivalent):
Alias /projects /path/to/projects
<Directory "/path/to/projects">
...
</Directory>
To make mod_rewrite function as expected I had to use the RewriteBase directive in /path/to/projects/project_name/.htaccess (or equivalent):
RewriteBase /projects/project_name
…and that’s it.
Filed under: Fix, .htaccess, cakephp, mod_alias, mod_rewrite