views:

219

answers:

3

Basically I'm using drupal and can current redirect to an SSL page. But once on that page and continuing navigation all the pages continue over HTTPS. There is a single page I need SSL on and I need to redirect back after you leave that page. Currently I have this:

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^conference https://url/conference/ [R=301,L]
RewriteCond %{SERVER_PORT} =443
RewriteRule !^conference http://url%{REQUEST_URI} [R=301,L]

Thanks

A: 

After the form data has been POSTed, redirect to an absolute HTTP URL.

Also, note that the form page itself does not need to use SSL; it is enough for the data to be POSTed to a HTTPS URL. This means that you do not need to use mod_rewrite at all for this.

Ignacio Vazquez-Abrams
A: 

Add this rule to return to HTTP:

RewriteCond %{SERVER_PORT} =443
RewriteRule !^join http://www.example.com%{REQUEST_URI} [R=301,L]
Gumbo
+1  A: 

The Secure Pages module can do exactly what you describe, in a highly configurable manner, so adding additional pages in the future can be done w/o editing .htaccess.

jhedstrom