I have the following wildcard vHost:
<VirtualHost *:80>
ServerAdmin hostmaster@example.de
ServerName autodiscover.*.*
ServerAlias autoconfig.*.*
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
</VirtualHost>
But my RewriteRule is wrong.
For Example:
autoconfig.testdomain.de
gets mapped to https://autoconfig.testdomain.de
What I want:
autoconfig.*.*
gets mapped tohttps://autoconfig.maindomain.de
autodiscover.*.*
gets mapped tohttps://autodiscover.maindomain.de
I want to parse only the subdomain part in %{HTTP_HOST}
to subdomain.example.de
, but only if the subdomain part is either autoconfig
or autodiscover