I'd like to have apache configured to handle multiple domains, routing them to directories based upon their domain name (ie. domain.com > /www/domain.com , domain.org > /www/domain.org , etc.) However, in doing so I would also like to rewrite any domain whose first part is "www" to the directory without the prefixed "www". I got close earlier today, but then I ran into conflict with the following in one of my domains:
- Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) PageSite.php/$1 [L]
So, the configuration needs to allow for the above still as well. What I had done, was used VirtualDocumentRoot /www/%0 and then I was trying to write a rule for mod_rewrite, but I pretty much botched that. I've seen plenty of rule examples that supply the domain name for this, but my problem is that I have four or five (and potentially growing) domain names on this server which I want to handle in this fashion, and I'd rather have one rule to cover them all, rather than multiple.
Can anyone help?
Thank you in advance.
Pax,
- Stan