Forum Moderators: phranque

Message Too Old, No Replies

SSL on subdomain only

using a shared SSL cert, want to apply it to subdomain only

         

alis

1:19 am on Jun 28, 2005 (gmt 0)



Hi,

I'm not super familiar with htaccess, particularly when it comes to SSL. I have a site, www.mydomain.com, with a donation page that I want to protect with SSL. The hosting company I have gives me a shared SSL cert to use. I've applied the cert to a subdomain I have named secure.mydomain.com. To apply the cert, the hosting company says to add the following to my .htaccess:

RewriteCond %{SERVER_PORT}!^443$
RewriteRule ^(.*)$ [secure.mydomain.com...] [R]

This does not appear to work. I figure I need to alter the RewriteCond in some fashion, but I'm not sure how. Also, how does this invoke the cert? Is it just by virtue of making the request via https? Sorry for my ignorance, this is uncharted waters for me.

ChadSEO

7:34 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Not sure how they have it setup, sometimes I have found it is necessary to put the following line at the top of the .htaccess file:

RewriteEngine On

Quinn

7:39 pm on Jun 28, 2005 (gmt 0)

10+ Year Member



Yeah I think in almost every case I've needed the RewriteEngine line. If you don't have it in the http.conf file you're going to need it and I don't think it hurts to add it anyways.