| Article: |
Step by Step: Configuring SSL Under Apache | |
| Subject: | Only a few pages need SSL under root folder | |
| Date: | 2008-08-29 21:54:55 | |
| From: | thien_king_mui | |
|
Hi guys,
|
||
Showing messages 1 through 1 of 1.
-
Only a few pages need SSL under root folder
2010-05-22 06:37:18 betol [View]



#[1] all /myapp/user, /myapp/subscription and /myapp/login pages should be served in https
RewriteRule /myapp/user https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule /myapp/subscription https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule /myapp/login https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
The following rules need to be put it in your <VitualHost *:443> section
#[2] For all other pages, if in https mode, serve the page in http mode.
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^/myapp(/login|/user|/subscription)
RewriteRule .* http://%{HTTP_HOST}%{REQUEST_URI} [L]
Hope this helps.