Redirect Subdomain Without Changing URL
Posted: Fri Apr 03, 2020 8:42 am
Hey Guys,
I hope this finds you all well. I have a primary domain domain.com created and I wanted a subdirectory sub.domain.com created too. As suggested, I simply need to treat it as another web domain so I created one for sub.domain.com.
I, however, wanted sub.domain.com to point to a directory/folder on my primary domain domain.com like the following:
sub.domain.com ---> domain.com/sub
where sub is simply a folder/directory, and that the URL stays the same sub.domain.com (not changing to domain.com/sub)
Is this possible via .htaccess? how do I go about this?
My machine runs on Centos 7 (with apache2 + Nginx). Thank you!
I hope this finds you all well. I have a primary domain domain.com created and I wanted a subdirectory sub.domain.com created too. As suggested, I simply need to treat it as another web domain so I created one for sub.domain.com.
I, however, wanted sub.domain.com to point to a directory/folder on my primary domain domain.com like the following:
sub.domain.com ---> domain.com/sub
where sub is simply a folder/directory, and that the URL stays the same sub.domain.com (not changing to domain.com/sub)
Is this possible via .htaccess? how do I go about this?
My machine runs on Centos 7 (with apache2 + Nginx). Thank you!