|
|
Joined: Sep 2004
Posts: 15
Newbie
|
Newbie
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.
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
Code Monkey
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
Joined: May 2001
Posts: 550 |
How do you mean "override" the urls?
|
|
|
|
Joined: Sep 2004
Posts: 15
Newbie
|
Newbie
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!
|
|
|
|
Joined: May 2001
Posts: 550
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 550 |
|
|
|
|
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
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.
|
|
|
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,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|