I am using mod_rewrite to route all requests to index.php.
My folder structure is as follows:
/Users/Peter/Projects/Framework
/.htaccess
/index.php
In my .htaccess file I have the following:
RewriteEngine on
RewriteCond $1 !^index\.php/
RewriteRule ^(.*)$ index.php/$1 [L]
This works fine when I visit projects.localhost/framework/example.
I also have the following alias set up: Alias /~alias /Users/Peter/Projects
When I navigate to http://projects.localhost/~alias/framework/example I get a 404 error and the following in my error log: File does not exist: /Users/Peter/Projects/framework/example
It seems that the .htaccess file isn't being called when I use the aliased URL (typing giberish into the .htaccess file doesn't trigger any kind of error when using the aliased URL seems to confirm this).
AllowOveride is set to All.
How do I get .htaccess working when using the aliased URL and have the rewrite rules apply consistently regardless of the URL (aliased or not aliased)?
Edit: Navigating to projects.localhost/~alias/framework/index.php/example also works fine, confirming that the alias is working properly (apart from not having the .htaccess rules applied to it).