I placed the following config in apache site conf
file:
<VirtualHost *:80>
ServerName domain.com
ServerAlias *.domain.com
ServerAdmin webmaster@localhost
Redirect permanent / https://domain.com/
</VirtualHost>
How can I have subdomains redirect without going to the main domain?
If I type http://subdomain.domain.com/
it redirects to https://domain.com/
but I want it to redirect to https://subdomain.domain.com/
. I also want it to be a wildcard so that it works for all subdomains.
Is it possible without engaging the mod_rewrite
module?