Web Hosting Talk







View Full Version : Redirect/Change URL, How?


Bodybags
01-25-2004, 01:52 AM
Hi,

Well, I have the Order form in the HTPPS Section of my Site, but the HTTP is working, and I only want HTTPS Connections allowed, is there a Way to use .htaccess to check if the user is on the HTTP and then redirect it to the HTTPS ?, if not where is the Cpanel Config File so I can Add a Redirect and then Modify the Config File (Add the S to HTTPS)

Please give some Ideas... Thanks.

Acroplex
01-25-2004, 01:59 AM
Just make sure all the links to the form are https://
While on the form page, all the links to other pages should be http:// and absolute, e.g. http://www.domain.com/about.htm

Bodybags
01-25-2004, 02:02 AM
ok...

But that means .htaccess Can't do it?

Thanks ;)

Acroplex
01-25-2004, 02:06 AM
Aew you saying that if someone goes to your form directly by typing http:// instead of https:// then you want to redirect them to the secure connection via an .htaccess redirect?

Bodybags
01-25-2004, 02:15 AM
Originally posted by timechange.com
Aew you saying that if someone goes to your form directly by typing http:// instead of https:// then you want to redirect them to the secure connection via an .htaccess redirect?

Yep, you got the Idea, but I don't know how to do it :bawling:

JTY
01-25-2004, 02:30 AM
It coud probably be done with mod_rewrite.

Knogle
01-25-2004, 03:22 AM
What version of Apache are you using?

Have a look at this for apache2: http://forums.devshed.com/t77214/s.html

Or this: http://www.colug.net/pipermail/colug/2003-February/006183.html

Make sure you have RewriteEngine set as On.

illuzhen777
01-25-2004, 04:44 AM
You could use PHP or Perl, whatever your using?