By webdev2 on
I have used Secure Pages module but it's actions not consistent across browsers.
Does mod_rewrite in the .htaccess file work for drupal? If so, do I change the file in web root?
Thanks.
I have used Secure Pages module but it's actions not consistent across browsers.
Does mod_rewrite in the .htaccess file work for drupal? If so, do I change the file in web root?
Thanks.
Comments
please disregard. I got it
please disregard. I got it working in .htaccess with:
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
to refer the entire site to use ssl.
Thanks a lot, the fact you
Thanks a lot, the fact you posted a solution saved me a lot of pain!
Best Regards
Torsten Zenk
Open-Consult.NET
I'm glad I can finally help
I'm glad I can finally help someone since so many have helped me here. You're very welcome.
using ssl module
can you help me to find exactly where i need to edit the .htaccess file and what i need to write....
SSL .htaccess
You edit the .htaccess file located in your root Drupal folder. Here is a example on how to make some pages SSL and others not SSL without using the secure pages module. http://www.runssl.com/content/how-redirect-drupal-or-ubercart-ssl-connec...
It was written for Ubercart but you can make some small changes to have it redirect by taxonomy.
.htaccess force SSL only some pages (and redirect http others)
Given that the link above is not working anymore this is my suggestion to secure pages (in this case user, user/login and donate/*)
First and second block set rules for clean url:
http://www.example.com/user to https://www.example.com/user
Third block check for not clean url (the path is in the query and it works either with and without leading slash):
http://www.example.com/index.php?q=user to https://www.example.com/index.php?q=user
http://www.example.com/index.php?q=/user to https://www.example.com/index.php?q=/user
Fourth block redirect to http other pages:
https://www.example.com/node to http://www.example.com/node
Check:
http://www.jonathandean.com/2009/03/apache-rewrite-rules-to-force-secure...
wow - that is one of the best
wow - that is one of the best posts/answers ever. Many thanks!!
Do not use mod_rewrite in
Do not use mod_rewrite in .htaccess for SSL redirections.
This will cause errors in certain pages of drupal_json() or drupal_to_js() AJAX responses.
The result will be javascript alert popup saying HTTP error 0 occurred, because of a HTTP 302 response (to move user from http:// to https://)
Instead use secure pages module, or try adding a $base_url to settings.php.