Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1794

Subdomains Display The Wrong Content Using HTTPS

$
0
0

I am using a wildcard SSL on my main domain and a few sub-domains (apps, dashboard, support, training). The problem I am facing is that when I try to access a sub-domain via HTTPS, it shows the index/main page of the root domain, but when the sub-domain is accessed via HTTP, it shows the correct page. I would like to know what information I would need to put in the .htaccess file to make the sub-domains:

  1. Automatically use HTTPS.
  2. Show the correct content on that sub-domain when using HTTPS.

The sub-domains don't currently have an .htaccess file, because I have no idea what should be put in there at this point.

Here is an example of the HTTP sub-domain: http://sub.example.com
Here is an example of the HTTPS sub-domain: https://sub.example.com
Here is the main domain: https://example.com

The main domain is doing exactly what I want it to do (www to non-www and automatic https redirection), but the sub-domains are not doing what I want them to do, as described above.

Here is the .htaccess file on the main domain:

RewriteEngine onRewriteCond %{HTTP_HOST} ^www\.(.*)RewriteRule ^.*$ https://%1/$1 [R=301,L]

Lastly, I am using cPanel under a reseller account serviced by HostGator.

Thanks for taking a look at this problem!


Viewing all articles
Browse latest Browse all 1794

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>