Welcome, Guest. Please Login or Register.
November 26, 2024, 09:46:02 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  General Category  |  Feedback  |  Running across domains « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Running across domains  (Read 7027 times)
luisr
Full Member
***
Posts: 120


Left blank to save space.

Running across domains
« on: August 29, 2003, 05:55:49 PM »
Reply with quote

My site has a couple of domain name aliases which point to the same location.  While the majority of people use the domain name normally advertised (meaning it is the one that appears in search engines) to reach my site, some users reach my site using one of the aliases.  That's mostly out of custom.  Main domain name is a .org domain and one of the aliases is the .com version of the same domain.

The thing is that the entire site runs under a framed environment, including my YaBB SE board.  As long as you come into my site using the .org domain everything is fine.  The problems start when people use one of the aliases.

I get frequent complaints about not being able to post because you must be registered to post in the forum and they just logged in.  More often than not, the reason is that the person was using the .com alias.  This happens because the forum is still in the .com domain when they log in, but right after they click the login button the forum switches to the .org domain (which is within the frames still in the .com domain).  Something happens across domains here that cookies don't work.

And this happens because the forum is "hardcoded" to the .org domain.

My question is, how can I make it run from any of the aliases without going back to the .org domain after the first click?  Where can I convert the absolute URL into a relative one?  Are there any security issues with this?

Thanks
Logged
Ben_S
Disciple of Joe
Support Team
YaBB God
*****
Posts: 1586


I Love YaBB SE!

WWW
Re:Running across domains
« Reply #1 on: August 29, 2003, 06:17:08 PM »
Reply with quote

You could add something like this to your index.php

<?php
   
if (strstr($_SERVER['HTTP_HOST'], 'domain.net')) {
      
header('Location: http://www.domain.org');
      exit;
   }
?>


I use it for http://www.redandwhitekop.net/forum/ to redirect to .com and it works fine.
Logged
luisr
Full Member
***
Posts: 120


Left blank to save space.

Re:Running across domains
« Reply #2 on: August 29, 2003, 07:26:31 PM »
Reply with quote

That could work but I am not looking for redirection, but rather that the forum stays under the domain the person used to reach the web site.

I could try that one in the mean time.

Thanks for the tip.
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Running across domains
« Reply #3 on: August 29, 2003, 08:05:43 PM »
Reply with quote

The problem is the way cookies work.

People are so *scared* of cookies that great and HEAVY restrictions have been made on them.

If you make a cookie from myplace.net, there is ABSOLUTELY NO WAY to access it from myplace.org.  And I do mean NO WAY.

I could show you how to make the forum work with the separate URLs, but they'd have to login for each domain.

-[Unknown]
Logged
Parham
Advisor
YaBB God
*****
Posts: 1337


#!/usr/bin/perl

WWW
Re:Running across domains
« Reply #4 on: August 30, 2003, 11:29:20 PM »
Reply with quote

I think you should redirect in my opinion... people with multiple domains usually do this.
Logged

luisr
Full Member
***
Posts: 120


Left blank to save space.

Re:Running across domains
« Reply #5 on: August 31, 2003, 06:03:24 PM »
Reply with quote

Quote from: [Unknown] on August 29, 2003, 08:05:43 PM
The problem is the way cookies work.

People are so *scared* of cookies that great and HEAVY restrictions have been made on them.

If you make a cookie from myplace.net, there is ABSOLUTELY NO WAY to access it from myplace.org.  And I do mean NO WAY.

I know about this cross-domain restriction.  That's why the title of this thread includes the words "across domains".

And I have told way too many people to loosen up their restrictions with cookies which cause the problem they have.

Oh well... I guess I will have to redirect.
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  General Category  |  Feedback  |  Running across domains « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.079 seconds with 20 queries.