Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 11-23-2006, 06:55 AM
Holmis's Avatar
Holmis Holmis is offline
Baby Croc
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 63
Default Https / Secure site

Hi everyone.

I was wondering if it is possible to make my site https upon first logging on to the site.

For example:

A user inputs http://www.mydomain.com and automatically goes to https://www.mydomain.com

Is this possible with shared ssl or do I have to buy a private one?

Regards,

Holmis
Reply With Quote
  #2  
Old 11-23-2006, 08:41 AM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,557
Default Re: Https / Secure site

Quote:
Originally Posted by Holmis View Post
Hi everyone.

I was wondering if it is possible to make my site https upon first logging on to the site.

For example:

A user inputs http://www.mydomain.com and automatically goes to https://www.mydomain.com

Is this possible with shared ssl or do I have to buy a private one?

Regards,

Holmis
That is not possible with shared ssl.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #3  
Old 11-23-2006, 01:09 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: Https / Secure site

You can do it using an htaccess mod_rewrite command. I do this exact thing with my webmail installation, to make sure everybody accesses it securely.

Let me know if you want the lines I use.
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #4  
Old 11-23-2006, 01:18 PM
Holmis's Avatar
Holmis Holmis is offline
Baby Croc
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 63
Default Re: Https / Secure site

Quote:
Originally Posted by slapshotw View Post
You can do it using an htaccess mod_rewrite command. I do this exact thing with my webmail installation, to make sure everybody accesses it securely.

Let me know if you want the lines I use.
That would be great!

Thanx
Reply With Quote
  #5  
Old 11-23-2006, 06:42 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,557
Default Re: Https / Secure site

Quote:
Originally Posted by slapshotw View Post
You can do it using an htaccess mod_rewrite command. I do this exact thing with my webmail installation, to make sure everybody accesses it securely.

Let me know if you want the lines I use.
Maybe I misunderstood, but I thought that the question was not about how to redirect to a secure site, but can you use https://www.yourdomain.com using shared ssl.

And the answer is: No. You need private ssl for that.

But to redirect from the non-secure address to secure you can use .htaccess.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss

Last edited by quietFinn; 11-23-2006 at 06:47 PM.
Reply With Quote
  #6  
Old 11-23-2006, 11:57 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: Https / Secure site

Let me explain my setup before I paste this. My domain's in my signature if you want to look, but i'll use an example domain in this post. I keep my webmail at domain.com/email. I have my ssl installed on www.domain.com, so putting a secure connection on email.domain.com would give a popup. So i have email.domain.com (which my clients know) redirect to http://www.domain.com/email. I also have another redirect which says if somebody goes to http://www.domain.com/email, they get sent to https:// that. Here it is:


Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^email.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.email.domain.com$
RewriteRule ^(.*)$ https://www.domain.com/email [R=301,L]

RewriteEngine On 
RewriteCond %{HTTPS} off 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
I hope that helps.
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #7  
Old 11-24-2006, 04:40 AM
cjnoyes cjnoyes is offline
Swamp Croc
 
Join Date: Jan 2006
Posts: 250
Default Re: Https / Secure site

You must have private ssl.

In this you would have to redirect using the shared ssl path to your server without private ssl
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 07:01 AM.