Reputation: 332
I have a subdomain static.example.com which delivers media content for my site. The problem is when I go to https://static.example.com, the browser redirects to https://example.com. Also, any files on the subdomain delivered via SSL return a file not found error. However, when I view them without SSL, everything works fine.
I have a wildcard ssl certificate installed via cPanel.
I am running Magento 1.5.1 on the site and the strange thing is that I have the media folder of Magento setup to https://static.example.com/media and everything works fine for that folder. But any files hosted outside the media folder and viewed via https or SSL get redirected to the main domain.
I've tried adding other subdomains, and the same problem keeps occurring. Could this be a .htaccess issue? A Magento issue? A SSL cert issue? A server config issue?
My .htaccess mod_rewrite code is posted below for reference.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^(index.php/)?minify/([^/]+)(/.*.(js|css))$ lib/minify/m.php?f=$3&d=$2
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/(media|skin|js|css|fonts|images|cdn)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>
Upvotes: 2
Views: 2056
Reputation:
It is impossible to host more than one SSL virtual host on the same IP address and port. I had same problem so i just created another IP and assigned it to subdomain (with new cert)
Upvotes: 2