Forwading http --> https?


#1

I just set up a secure joomla site on dreamhost. How can I redirect any http requests to https requests? As it is right now, going to the site via http results in ‘failed to connect.’


Clark


#2

Do you want to try DH panel --> Domains --> Manage Domains --> DNS --> Redirect?

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#3

You’ll want to use a rewrite directive in your htaccess to rewrite all urls to use https. A little Google search will lead to a whole bunch of sites that all reference the following snippet:

RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!


#4

I think if you do it via panel, DH will just generate the same file in the directory. What do you think?

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#5

Thanks! That works well. I discovered that all I need to do is tell the Joomla login module to use https and all pages reached after that are ssl! Couldn’t be simpler.


Clark


#6

I’ve used this idea for other domains, but I seem to be failing at how to use it for a subdirectory:

RewriteEngine On
RewriteCond %{SERVER_PORT}      !^443$
RewriteRule ^/(.*)              https://%{SERVER_NAME}/$1 [L,R]

Basically, if someone manually types in “http://www.mydomain.com/shop” I want them to immediately reroute to “https://www.mydomain.com/shop

Am in need of suggestions, please!


#7

D’oh!

Well, as it happens, the subfolder was my shop, and that shop is run by Zen Cart.

I was able to make the changes to Zen Cart to take advantage of my security certificate. So, Zen Cart switches the site to HTTPS when it NEEDS to (during transactional times), and then switches back when it doesn’t.

Mischief managed!