PDA

View Full Version : Editing htaccess file to direct links to "https"



lznewbie
03-17-2008, 12:03 AM
Hi! I should first state that I am a newbie to all this web creations so please forgive me if I am stating or asking simple things.

Currently I have a dedicated server & SSL. I would like when someone types in "www.myaddress.com" for it to come up as "https://www.myaddress.com" so that it is secure. This would go for any subdirectories under this as well. Basically I would like my whole site to be in the secured https. I was told that I need to edit my htaccess file. I can get to the place where I can edit this file, but I'm not sure what code I should be typing to make this happen. Is there anyone that can help me? Thanks. :)

lznewbie
03-17-2008, 01:54 AM
Alright, I did some searching on the web and found this code:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

The problem is it now prompts me to enter in my id/password twice (my public_html file is password protected). I'm guessing it's because it wants me to log on at the http site and again when it redirects it to https. Any thoughts on how to get around this?