MyBB Community Forums

Full Version: DNS FORWARDING
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

This is my first post so I apologise in advance if I haven't followed the recommended protocol....but I'm sure I'll pick it up as I go along.

My problem is related to DNS Forwarding. I have two domain names, both with the same hosting company. I only pay for one hosting service and use the DNS forwarding feature to route visitors using (DOMAIN A) to the hosted (DOMAIN B). This simply masks the identity of the real url - don't ask why its set up this way - its a long story - and something we plan to fix ...but later!

When (DOMAIN A) visitors land on the home page they can navigate to the forum by selecting the appropriate menu option. The forum opens up correctly but login and registration don't seem to work.

I am the registered Adminstrator and when I provide my valid username and password it says that "login has been successfull and I will be taken back....etc". Up to this point everything looks normal.

However, the home page remains in a 'login - register' state and none of the forum details, number of posts etc. are displayed. I've read a few posts on the forum about similar problems and I suspect it is related to the cookie settings in the /inc/settings.php file but I'm not sure.

When I go to the forum via its direct (DOMAIN B) url everything works as it should so I'm convinced its a linking/routing setting that is failing.

Your help would be much appreciated.

Regards.







You can only use 1 domain, pick one and redirect the other.
AJS

I think that's what I am doing.

"Pick one" - the forum is hosted and working on DOMAIN B
"and redirect the other" - I've set up redirection on DOMAIN A to forward incoming requests to DOMAIN B.

Is that what you meant or am I missing something?

Regards


You need to change your cookie settings to reflect domain A.
pyridine

Thanks.

I've set the follwing in forum/inc/settings.php as follows:

$settings['bburl'] = "http://www.domainB/forum";
$settings['cookiedomain'] = ".domainA.co.uk";
$settings['cookiepath'] = "/";
$settings['cookieprefix'] = "";

...it did'nt fix it.

I've also tried:

$settings['cookiepath'] = "/forum/";

but still no joy?


You can't use different domains for your URL and cookies, that's not going to work. It all needs to use one domain.
if your setup shows the actual domain name being requested, then it wont work as your browser will see it as cross-site cookies.

you need to have domainA change to domainB when the user gets to your page. Setup the forum for domainB and have an htaccess rewrite change domainA to domainB
hi all,

thanks for your ideas and suggestions. I decided to bite the bullet and transfer the hosting service to DOMAIN A - which involved a full rebuild of the site, but hey! it needed doing at some time, right?

Interestingly, I didn't have to tansfer the database, presumably because the hosting company keep this on a separate server.

tx again...until next time.
(2011-04-10, 01:52 PM)gatepark1 Wrote: [ -> ]Interestingly, I didn't have to tansfer the database, presumably because the hosting company keep this on a separate server.
I wouldn't recommend to separate the database and the webspace on different hosting companies.
There is one way you can easily achieve multi-domain access to the same site with parked domains, just change those lines in your settings.php file :

$settings['adminemail'] = "webmaster@{$_SERVER['SERVER_NAME']}";
$settings['bburl'] = "http://{$_SERVER['SERVER_NAME']}";
$settings['contactlink'] = "mailto:webmaster@{$_SERVER['SERVER_NAME']}";
$settings['homeurl'] = "http://{$_SERVER['SERVER_NAME']}";

Be informed that any time you will change your settings in MyBB your values will be reverted to what they were before and it wont work anymore. Just remember to edit them back afterward...

It would be so easy for MyBB developpers to allow multi-domain access in their code with a single boolean choice in settings choosing between single and multi-domains! Cool