Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2004
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2004
Posts: 15
Did a few searches and found stuff relating to cross-domain cookies, duplicate installations, and the referer information, but not this particular issue.

We recently added a second domain name (bloodnmud.com) to our site so it wouldn't be blocked by stingy firewalls (our primary domain is OrangeWhoopass.com). Both domains point to the same installation of UBBt+IIP on the same physical server.

Site pages load normally when using the second domain, with no broken links or images. However, all links generated by UBB always point back to orangewhoopass.com, which pretty much defeats the purpose of the second domain. I notice that links in the IIP menu point to bloodnmud.com.

Is there any way to make UBB "know" what domain it's at and generate all of its links accordingly? Could I try typing "http://www.orangewhoopass.com/bbs|http://www.bloodnmud.com/bbs" into the absolute URL field, or would that hose the whole thing?

Any help would be appreciated, thanks.

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
in config.inc.php there are several places where the domain is hardcoded, for instance

$config['phpurl'] = "http://www.domain.com/forums";

You could replace all instances of www.domain.com with the variable $domain,
and at the top of the file define

$domain = $_SERVER['HTTP_HOST'];

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
It might be better to override the URLs inside ubbt.inc rather than play with $config directly inside config.inc.


UBB.classic: Love it or hate it, it was mine.
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
How do you mean "override" the urls?

Joined: Sep 2004
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2004
Posts: 15
[]Anno said:
in config.inc.php there are several places where the domain is hardcoded, for instance

$config['phpurl'] = "http://www.domain.com/forums";

You could replace all instances of www.domain.com with the variable $domain,
and at the top of the file define

$domain = $_SERVER['HTTP_HOST']; [/]

EXCELLENT! Thanks!

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
I see it works, nice.

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
[]Anno said:
How do you mean "override" the urls? [/]

I mean what I say.

config.inc gets rewritten every time you submit a configuration page. This will result in the inserted variables being overwritten with their values.

So, instead, override things in ubbt.inc...


UBB.classic: Love it or hate it, it was mine.
Joined: Sep 2004
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2004
Posts: 15
[]Charles Capps said:

config.inc gets rewritten every time you submit a configuration page. This will result in the inserted variables being overwritten with their values.[/]

Isn't it only the variables in the "DB, Paths & URLs" page? Those are not likely to change, so it doesn't matter for us.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,834
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)