Shared SSL
PermalinkI have seen several examples posted of forcing a site to use SSL on a regular certificate (changing from HTTP to HTTPS). However, I have a shared ssl cert where the secured ssl resolves tohttps://masterdomain.com/sharedsitename_com... (in this format, not actual domain)
Using the tricks I've found I am unable to get it to work. Including changing the base domain in the site.php file.
Is there a way to get this to work?
Can you reply with some more information on what happens and details of your server setup please?
Thanks!
Jon
thank you for the quick reply and sorry for not responding sooner, I have been away.
Yes, It used to come up with a 404. then I found another post and suggestions. I added some code to my config/site.php file to have two base_urls. Like this:
if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) {
define('BASE_URL', 'https://secure.site.com);
} else {
define('BASE_URL', 'http://site.com);
}
Thank Ryan (I think of the concrete 5dev team) for the code. This way the shared ssl can be accessed. I use hostmonster and the shared ssl is throughhttps://secure.hostmonster.com/~yourunixusername...
So now it does find the do_login. But if I type in a username and password it pops up a login page with "do_login" in the address but it states "A username and password are required." as if it did not sense the info I had typed.
How do I get it to find the user entered info?
Kinda guessing a bit here though...
Can you check in the net panel in firebug and confirm what's going on?
Jon
Thanks! I think you are right about trying to stay in an ssl once logged in. It makes sense to me anyway.
Now how do I do that? Anyone got any clues?
So the final code that worked (for me) is to put this into your config/site.php file:
IMPORTANT NOTE: Make sure you remove the old BASE_URL definition from your config/site.php file when you add this -- if you don't you'll get php errors because you can't define the same constant more than once.
I can use htaccess to redirect an http login page to https login but it doesnt find the do_login.