These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Trying to figure out subdomain server alias redirects. on the new forum.
I’m trying to figure out how to do the following scenario with Virtualmin on Centos with Apache as the server.
I have myserver.domain working and I also have subdomain.myserver.domain working as a server alias for myserver.domain. What I’d like to do is have subdomain.myserver.domain resolve to myserver.domain/subdomain-page when visitors use the subdomain url instead of it going to the sites main home page.
Any help pointing me in the right direction is appreciated.
.htaccess, something like this (sorry, no time to test it)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.myserver\.domain$ [NC]
RewriteRule ^(.*)$ http://myserver.domain/subdomain-page/ [L,R=302]