SMF Support > SMF 1.1.x Support

two Domain Names with one forum

<< < (6/7) > >>

Realinfo:
.htaccess  not work in my server.............. any other way...........

Arantor:
Why doesn't it work? And no, not really another way without writing modifications to index.php.

Realinfo:

--- Quote from: Arantor on August 20, 2009, 09:07:07 PM ---Why doesn't it work?
--- End quote ---

May be as of window server not linix ( not very sure)



--- Quote from: Arantor on August 20, 2009, 09:07:07 PM --- And no, not really another way without writing modifications to index.php.

--- End quote ---

Ya. tell me what modification we can do in index.php...........

Arantor:
Well, find out from your host if it uses Apache, and if it is, what the setting for 'AllowOverride' is.

Failing that, add this to the very top of your index.php file.

--- Code: ---$host = $_SERVER['host'];
if(strpos($host, 'realinfo.info') !== false) {
    header( "HTTP/1.1 301 Moved Permanently" );
    header( "Location: http://realinfo.tv" . $_SERVER['REQUEST_URI'] );
    exit;
}

--- End code ---

whitewash:
Hello,
I would like to do something similar,e.g. having a domain alias(ses) for my forum and running the same forum on both(more) domains (sharing DB, sessions etc)

Unlike Realinfo, both domains will be active, ( something like forum.domainname.tld, forum.domainname.different_tld etc...) My hosting provider can make one domain "main", with webhosting service attached to it, and create the rest as aliases, so this is not a problem. The problem is with session management (cookies from domainname.tld are not readable by domainname.another_tld and vice versa). So is there any way I could ensure, that the SAME forum with the SAME db and SAME user sessions will be running on multiple domains?

PS: Unfortunately, bare "redirection" (302 moved permanently or something like that) is not an option here :(

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version