Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 11, 2005 2:04 am 
Offline
Senior Member

Joined: Tue Mar 09, 2004 3:52 am
Posts: 106
Hi there.

I have a website with a properly installed SSL cert. Now, I would like to setup apache so that all pages in the /members/ folder and sub-folders are forced to https, even if the link to the page or the user types in http.

Is there anyway to do this on the Apache end so that the user cannot disable SSL?

Thank you!


Top
   
 Post subject:
PostPosted: Mon Apr 11, 2005 3:31 am 
Offline
Senior Newbie

Joined: Mon Sep 13, 2004 1:09 am
Posts: 7
You should be able to do it with an apache rewrite rule (If your using apache).
Something like this in your main server config.

Code:
RewriteCond   %{SERVER_PORT}  !^443$
RewriteRule ^/members(.*)$ https://%{HTTP_HOST}/members/$1 [L,R]


Top
   
 Post subject: Worked!
PostPosted: Tue Apr 12, 2005 1:45 am 
Offline
Senior Member

Joined: Tue Mar 09, 2004 3:52 am
Posts: 106
Thanks!!

Code:
RewriteCond   %{SERVER_PORT}  !^443$
RewriteRule ^/members(.*)$ https://%{HTTP_HOST}/members$1 [L,R]


My slightly modified code, removed a slash.


Top
   
 Post subject:
PostPosted: Tue Apr 12, 2005 7:33 am 
Offline
Senior Newbie

Joined: Mon Sep 13, 2004 1:09 am
Posts: 7
Yeah ya right, didnt really have time to test it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group