I have two Virtual Hosts configured on my Apache installation. The second Virtual Host has two Alias folders, pointed to the DocumentRoot folder of the first Virtual Host, which has a .htaccess files with some RewriteRules.
Whenever I send a request to the script (to rewrited rule URL) in the alias folder in the second Virtual Host, I am getting the 404 error. But When I send the request to the First Virtual Host with the same URL (without the alias prefix), it is working fine.
The .htaccess file in the Alias folder is not working when I send a request to the alias folder. If I use RewriteBase, then the requests sent to alias are working and requests sent to VHost 1 are failing.
Aw, I HATE the RewriteBase as it’s only needed by mod_rewrite to UNDO the effects of a mod_alias redirection.
Okay, okay, I confess that I don’t understand why anyone would use it because I don’t fully understand what it does (and why it needs to be used) - to me, it merely confuses an already confusing situation with redirects. Having taken a look at what you’re doing with it, I believe that your approach is correct but … well, I need to look into it more and I’m away all this week so … er, sorry for the flip comment based on a bias of ignorance.