Forum Moderators: phranque
An example of code that works for my parked domains is:
RewriteCond %{HTTP_HOST} ^.*parked1\.com$
RewriteRule ^(.*)$ /parked1/$1
Any clue as to how to get a subdomain such as me.parked1.com to work? By the way, I checked with my host and they have DNS wildcards enabled.
Try putting your third level domains ahead of the other domains in the list and use the "L" switch for last.
RewriteCond %{HTTP_HOST} ^foo.parked1\.com$
RewriteRule ^(.*)$ /parked1/foo/$1 [L]
RewriteCond %{HTTP_HOST} ^bar.parked1\.com$
RewriteRule ^(.*)$ /parked1/bar/$1 [L]
RewriteCond %{HTTP_HOST} ^.*parked1\.com$
RewriteRule ^(.*)$ /parked1/$1
I think what is happening, is that the stock "parked.com" is being activated ahead of the thrid level domains.
You do have some sort of wild card dns setup right? Where the 3rd level is passed to your site? Most filter it.
http://foo.webmasterworld.com
That gets filtered and rejected at the dns level by the host, and there is never an opportunity for us to grab the host name.