Join our Community      Check your private messages       Profile       Search       FAQ       Memberlist       Log in

Force https

 
Post new topic   Reply to topic    NetHosted Community Index -> Web Design
Garry Reply with quote
 NetHosted Customer

 

 Joined: 03 Oct 2005
 Posts: 243
 Location: Lincoln, UK

PostPosted: Wed Dec 19, 2007 9:42 am    Post subject: Force https
 
Hi,

I am setting up a billing system and want to force people to use the https so for example if they go to:

http://secure.mydomain.com/ 
or
http://secure.mydomain.com/nameofpage.php 

It would change the http to https, does anyone know how to do this ?

_________________
Regards,
Garry
Back to top
View user's profile Send private message Visit poster's website
NetHosted - Andrew Reply with quote
 NetHosted Staff

 

 Joined: 22 Mar 2004
 Posts: 5625
 

PostPosted: Wed Dec 19, 2007 10:42 am    Post subject:
 
Put this inside a .htaccess file in your secure folder:

Code:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domainhere.com/$1 [R,L]


Thanks,

Andrew

_________________
| Andrew Bassett
| Managing Director, NetHosted Ltd.
| Resellers, take a look at overselling !
| Members, tell us what you think  of NetHosted!
Back to top
View user's profile Send private message
Post new topic   Reply to topic    NetHosted Community Index -> Web Design
Page 1 of 1

User Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

 
Jump to: