BASE URL issue with SSL encryption

Permalink
My host initiates an SSL connection if the hyperlink to the page that is required to be encrypted is in the following format:https://secure.bluehost.com/~myusername/.... I have my concrete install in a sub directory of my public_html folder called "testsite". I created several pages (home, events, submit info, contact). The "Submit Info" page is the only page that is required to be encrypted. I excluded the "Submit Info" page from navigation. Next I added an external link "Submit Info Securely" from site map in the dashboard:https://secure.bluehost.com/~myusername/testsite/index.php/submit-in... I then added the following to my site.php config file: define('REDIRECT_TO_BASE_URL', false);
This allows me to click on the "Submit Info Securely" link on my site and achieve an encrypted connection, however if I click on one of my other pages (home, events, contact) I am still in an encrypted connection and my address bar maintains thehttps://secure.bluehost.com/~myusername/testsite/index.php/whateverp... I would like to terminate the encrypted connection and revert back tohttp://www.mydomain.com/testsite/whateverpageIamon.... Is there a procedure utilizing possibly an IF statement I could add to the site.php config file to call up define('REDIRECT_TO_BASE_URL', false); when an ssl hyperlink is chosen and
define('BASE_URL', 'http://www.mydomain.com');
define('DIR_REL', '/testsite'); when a regular (non ssl) http hyperlink is chosen? I know I could achieve this by excluding all my pages from autonav and creating external hyperlinks for each page but that defies the purpose of autonav. Any help or guidance would be greatly appreciated.

gavinc
 
jelthure replied on at Permalink Best Answer Reply
jelthure
might be easier just to remove the autonav from your secure page and hard code it in with the correct links. Just copy from the generated source on one of your non secure pages and paste it in a html block or something like that.
gavinc replied on at Permalink Reply
gavinc
That is probably the simplest way to achieve what I need. I like that I will be able to maintain the autonav features on all my non secure pages instead of setting everything up on external links that wouldn't reflect any new pages added in the future. To be safe maybe I will eliminate navigation from the secure page for submitting info and just have the secure page redirect the user back to the home page upon submit or cancel. I will experiment with it. Thank You for a fresh idea.
ThemeGuru replied on at Permalink Reply
ThemeGuru
Just make the entire site ssl:

Then you can still use the autonav addon.

Edit the config.php file

My ssl site:

<?php 
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'db_username');
define('DB_PASSWORD', 'db_password');
define('DB_DATABASE', 'db_database');
define('BASE_URL', 'https://domainname.com');
define('DIR_REL', '');
define('PASSWORD_SALT', 'J7zxKgpStqX6lYTc1RaB8MkWe4unfUrmZjE9IhynG2osVvfLA');
define('PERMISSIONS_MODEL', 'advanced'); 
?><?php  define('REDIRECT_TO_BASE_URL', true); ?>
gavinc replied on at Permalink Reply
gavinc
I am using a free shared SSL certificate. It would not be ideal to have the address bar for the entire site to displayhttps://secure.bluehost.com/~myusername/testsite/.... This would be fine if I were to purchase my own SSL certificate but at this point that is not an option. I appreciate your input and will keep it in mind.