944,038 Members | Top Members by Rank

Oct 19th, 2004
0

HTTPS to HTTPS - Before Cert?

Expand Post »
I have browsed through various forums in search of an answer to this:

I need https://www.domain.com to redirect to https://domain.com. Reason being, the cert is only valid for https://domain.com and not https://www.domain.com

This rewrite rule works fine to redirect:

==
rewriteEngine on
rewriteCond %{HTTP_HOST} !^domain\.com
rewriterule (.*) https://domain.com/$1 [R=301,L]
==

Only one problem. I still get prompted that the SSL cert is invalid for https://www.domain.com, and only after I accept the certificate in it's invalid state do I get redirected to https://domain.com. I have tried using this rewrite rule in .htaccess and the virtual host directive for 443 within httpd.conf. No luck.

My goal is to have https://www.domain.com redirected to https://domain.com before the cert prompt.

Note: The SSL-domain logs no longer show https://www.domain.com being accessed, but rather https://domain.com after the rewrite. Yet, still no success with redirecting before the cert check takes place.

Any suggestions?
Similar Threads
Reputation Points: 41
Solved Threads: 2
Junior Poster in Training
fsn812 is offline Offline
93 posts
since Jan 2004
Oct 25th, 2004
0

Re: HTTPS to HTTPS - Before Cert?

I know this is silly...but I did it previously.

After making all of those changes to your apache configuration...did you restart apache? Last time I altered my .htaccess file I couldn't figure out why I wasn't getting prompted for a password (I added pword prot to a directory). Then I restarted apache and slapped my forehead EXTREMELY hard.
TKS
Reputation Points: 108
Solved Threads: 18
Posting Pro in Training
TKS is offline Offline
470 posts
since Jan 2004
Jan 28th, 2005
0

Re: HTTPS to HTTPS - Before Cert?

Quote originally posted by TKS ...
I know this is silly...but I did it previously.

After making all of those changes to your apache configuration...did you restart apache? Last time I altered my .htaccess file I couldn't figure out why I wasn't getting prompted for a password (I added pword prot to a directory). Then I restarted apache and slapped my forehead EXTREMELY hard.
You generally don't need to restart apache for the .htaccess files to take affect.

Thats odd.


Is there anyway you can send your visitors to http://domain.com before they access the ssl page??
Reputation Points: 10
Solved Threads: 1
Newbie Poster
fooumang is offline Offline
19 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Linux Servers and Apache Forum Timeline: Hosting a windows webpage on a linux server
Next Thread in Linux Servers and Apache Forum Timeline: domain/virtual hosts all messed up, can't see the files in FTP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC