I need a little help with directing a subdomain to a specific subdirectory on the parent domain. I'm being limited because my webhost uses cpanel to manage subdomains and redirects. So I'm hoping I can do what I want in the .htaccess file.
Here's what I want to do..
1. I have abc.com as the parent domain.
2. I have parked xyz.net as a subdomain of abc.com
3. I want to preserve xyz.net in the url for my visitors when they visit the site. So I don't want to redirect xyz.net to abc.com/xyz.
The easiest thing would be to set the docroot for the subdomain to the xyz subfolder; but cpanel won't let me do that and I'm not able to update apache for the host provider.
So is there a way to do this in .htaccess. In doing some research I think I found a solution; but it's not exactly what I want..at least I don't think it is.
I found:
RewriteCond ${HTTP_HOST} !^www\.xyz\.com
RewriteCond ${HTTP_HOST} ^([^.]+)\.xyz\.com
RewriteRule (.*) /xyz/ [L]
Is this close?