TotalChoice Hosting Family Forums: Need Cert For Both Www And Base Domain? - TotalChoice Hosting Family Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Need Cert For Both Www And Base Domain?

#1 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 14 February 2006 - 08:22 PM

If I get an SSL cert for basedomain.com do I also need one if I want to use www.basedomain.com too?

Thanks,
Bruce

#2 User is offline   TCH-Andy Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Staff
  • Posts: 4,729
  • Joined: 14-January 03

Posted 15 February 2006 - 01:47 AM

Yes you would (if you don't want a warning coming up on some browsers), but why not just force the use of basedomain.com rather than allowing www.basedomain.com.
Andy Beckett

#3 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 15 February 2006 - 02:00 AM

How do you force www to the base domain?

Bruce

#4 User is offline   TCH-Rob Icon

  • Help Desk Manager
  • PipPipPipPip
  • Group: Members
  • Posts: 7,818
  • Joined: 11-March 03

Posted 15 February 2006 - 02:10 AM

One way is an htaccess or cPanel redirect.

#5 User is offline   TCH-Andy Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Staff
  • Posts: 4,729
  • Joined: 14-January 03

Posted 15 February 2006 - 02:16 AM

As Rob says, you need to do a redirect. If you do it in the .htacces file and you wanted to redirect everything then it would be;

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


However, it does depend on what else you are doing, and if you want everything on https, etc. etc.
Andy Beckett

#6 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 15 February 2006 - 11:51 AM

I don't everything redirected to https. What would be nice is if I could just force ***** to http://**** and https://www.**** to https://****.

I am implementing an osCommerce store and just need https for the account and checkout functions.

Thanks,
Bruce

#7 User is offline   TCH-Andy Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Staff
  • Posts: 4,729
  • Joined: 14-January 03

Posted 15 February 2006 - 01:39 PM

I haven't tested, but I think it should be;

RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^ https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://tchdomain.ext%{REQUEST_URI} [R,L]


The first will redirect your secure and the second your http.

If it doesn't work - shout, and we'll take a closer look.
Andy Beckett

#8 User is offline   crippen Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: 12-October 04

Posted 15 February 2006 - 03:51 PM

Hi Andy, would you know of any htaccess script which would force all domain requests to the shared ssl address?
Crippen & Landru Publishers
crippenlandru.biz

#9 User is offline   TCH-Andy Icon

  • Immediate Family
  • PipPipPipPip
  • Group: Staff
  • Posts: 4,729
  • Joined: 14-January 03

Posted 15 February 2006 - 04:10 PM

You should be able to do a redirect along the lines of the first example I posted above.

Just to check my understanding, you want any request coming in, for any file, to use the shared (not your) SSL ?
Andy Beckett

#10 User is offline   crippen Icon

  • Family Friend
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: 12-October 04

Posted 15 February 2006 - 06:18 PM

View PostTCH-Andy, on Feb 15 2006, 04:10 PM, said:

Just to check my understanding, you want any request coming in, for any file, to use the shared (not your) SSL ?


I'm not entirely decided but yes this may be a possibility.

would the code line then be:

RewriteRule ^ https://server###.tchmachines.com/~username%{REQUEST_URI} [R,L]

Crippen & Landru Publishers
crippenlandru.biz

#11 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 16 February 2006 - 01:48 AM

View PostTCH-Andy, on Feb 15 2006, 01:39 PM, said:

I haven't tested, but I think it should be;

RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^ https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://tchdomain.ext%{REQUEST_URI} [R,L]


The first will redirect your secure and the second your http.

If it doesn't work - shout, and we'll take a closer look.


Thanks Andy. I will give this a try when your techs figure out how to install my SSL cert.

Bruce

#12 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 16 February 2006 - 01:21 PM

Andy,

I tried your code but I get a "redirect limit exceded" error. This is what I currently have in .htaccess. I commented out the https stuff as part of my testing. Any ideas?

Bruce

RewriteEngine On
###RewriteCond %{SERVER_PORT} =443
###RewriteRule ^ https://2wheelhobbies.com%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^ http://2wheelhobbies.com%{REQUEST_URI} [R,L]


#13 User is offline   slawsonb Icon

  • New To The Neighborhood
  • Pip
  • Group: Members
  • Posts: 17
  • Joined: 16-October 04

Posted 16 February 2006 - 01:44 PM

Okay. I think I fixed it. The problem is that the not operator (^) can't have a space after it.

Corrected .htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT} =443
RewriteRule ^https://tchdomain.ext%{REQUEST_URI} [R,L]
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^http://tchdomain.ext%{REQUEST_URI} [R,L]


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users