htaccess with wildcard SSL

Posted by Ericko on Server Fault See other posts from Server Fault or by Ericko
Published on 2012-04-03T19:44:10Z Indexed on 2012/04/03 23:31 UTC
Read the original article Hit count: 148

Filed under:
|

We have a Wildcard SSL Certificate that is supposed to work on any subdomain of a given domain.

So in this server we have this file structure:

/home/DOMAIN/public_html/subdomainx /home/DOMAIN/public_html/subdomainy etc...

Now, the Certificate is installed, but when you visit any subdomain over https (example: hxxps://subdomainx.domain.com ) it points to

/home/DOMAIN/public_html/index.php

We need that when you visit a subdomain via https hxxps://subdomainx.domain.com

That it points to the the same directory that it's http equivalent: /home/DOMAIN/public_html/subdomainx

Our provider tells us that this is not possible, that the current behaviour is correct, and that to achieve this we need to do it with htaccess.

I've tried a few things, incluiding this solution, that seems to be what I need: http://stackoverflow.com/questions/5365612/advice-on-configuring-htaccess-file-to-redirect-http-subdomain-to-https-equival

But can't get it to work.

Any tips? Thanks.

Added: The server is Apache.

© Server Fault or respective owner

Related posts about .htaccess

Related posts about wildcard-ssl