|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
I have a friend who can only access my site via SSL (hardcore security policies at his cushy govt job), and everywhere that uses the "full_url" breaks his browsing via SSL and pops him to the normal page (making a post, creating a topic, replying, pms, logging in, etc)... So I got the bright idea tonight to hack in full SSL support via tweaking with the full url string in the array in the config.inc.php... It's fairly easy to do, but only tested on PHP5 (though it should work on PHP4). In includes/config.inc.php: Find: // Note: If you modify ANY code within your UBB, we at Groupee, Inc // cannot offer you support -- thus modify at your own peril :)
Add After: $ssl = $_SERVER["HTTPS"]; $url = $_SERVER["HTTP_HOST"]; if($ssl == "on") { $https = "https"; } else { $https = "http"; }
Then Find: # 'FULL_URL' => 'http://www.yourdomain.tld/path',
Replace With: 'FULL_URL' => $https . '://' . $url . '/yourpath', It'll take and change "http" with "https" if ssl is being used, else it'll take and use "http". Also I set $url to identify if a user is accessing my forum from another domain name (as I have several). It should work on any Apache based UBB.Threads install with PHP4/5 though...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Nice mod gizzy, never thought of this 
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
Yeh, it works lovely lol.. Granted my reasoning is to bypass web filters lol...
He posted toay from work without issue, so thats good; he's been so swamped at work that he hasn't been able to visit (cas they have out site blocked for some reason; yet he can get to 2600.net just fine)...
It's amazing how painless it was though lol... i haven't checked if updating the paths page on the forum clears this mod though, should be something to check out lol...
I don't see why it wouldn't work on php4 though, i checked some old code i used to do something similar and it is near identicle, so it should work fine. And I don't really see why it wouldn't work on IIS either.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|