If I have undefined subdomains, and there is a wildcard subdomain defined for the domain (via the hosting account at JustHost), is it possible to have a wildcard SSL certificate for subdomains that have not yet been defined?
For instance, a URL of https://fred.example.com needs to have a valid certificate. A wildcard subdomain has been set up for *.example.com . The fred.example.com subdomain has not been explicitly defined.
Any access to https://fred.example.com will be redirected by an htaccess rule to a specific page ('landing.php'), which will process the 'fred' part of the URL:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ https://www.example.com/landing.php?q=$1 [R=302,L]
Note that the subdomain can be any value. The landing.php file takes care of processing valid subdomain name values.
The current configuration at my host (JustHost) results in an "SSL_ERROR_BAD_CERT_DOMAIN" on the browser. I need https://fred.example.com to be valid, so that the htaccess rule can redirect it.