Using Coppermine over subdomains for IBP 1.3 Using Coppermine over subdomains for IBP 1.3
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Using Coppermine over subdomains for IBP 1.3

Started by Darth Unrivaled, February 25, 2005, 12:51:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Darth Unrivaled

OK I think I have got this to work now. I am not use if this is right and if not please let me know. This is what I did to get it to work over IPB 1.3 but I am sure it can be done using any of them.

Find this.
// The web path to your Invision Board directory
// In this example http://yoursite_name.com/ivboard/
define('IB_WEB_PATH', '/forum/.');


Inside of puting '/forum/ put this: forum.

Please place whatever subdomain your forums are. mine is forums.xfiresystems.com

Now go down to this:

// Redirect
function udb_redirect($target)
{
    header('Location: http://' . $_SERVER['HTTP_HOST']  . IB_WEB_PATH  . $target);
    exit;
}


Chance it to this. remember to use your domain anme where it saids domain.com.

// Redirect $_SERVER['HTTP_HOST']
function udb_redirect($target)
{
    header('Location: http://' . IB_WEB_PATH . xfiresystems.com . $target);
    exit;
}


Now you need to go down and add a / in front of the index.php on each one.

// Register
function udb_register_page()
{
    $target = '/index.php?&act=Reg&CODE=00';
    udb_redirect($target);
}
// Login
function udb_login_page()
{
    $target = '/index.php?&act=Login&CODE=00';
    udb_redirect($target);
}
// Logout
function udb_logout_page()
{
    $target = '/index.php?&act=Login&CODE=03';
    udb_redirect($target);
}
// Edit users
function udb_edit_users()
{
    $target = '/index.php?act=Members';
    udb_redirect($target);
}


See how I added / before the index.php

You'll need to scroll down a bit more and find this:

// Edit user profile
function udb_edit_profile($uid)
{
    $target = '/index.php?&act=UserCP&CODE=00';
    udb_redirect($target);
}


Same thing. add a / before the index.php

Now I read a few post where some people said not to remove the $_SERVER['HTTP_HOST']  and that it can cause problems. Now if you follow the steps on adding copper mind to your IPB 1.3 and then make these adds to the briige file it should work. Make sure you check your cookies as well. Make sure you IPB cookie is set to .domain.com and the others are blank. I hope this helps those who want to use subdomains with the board and gallery. However this will not work over different domain names. example: board.domain1.com and gallery.domain2.com. Both must be on the same domain name but are on different subdomains. Example board.domain.com and gallery.domain.com. Now I dont know if this will work with ther other forums as I dont use them. I hope that this will at least show them where to go and what needs to be edited. For IBP 1.3 this should work 100% with out errors.

I'm a bit of a newbie to PHP, about a year and a half into it. So I'm not sure if removing $_SERVER['HTTP_HOST']  will cause problems but if someone knows what the code is for subdomains please let me know as that would be better. I hope this helps.

Nibbler

All you need to do is as described in this post. One change is all that is required to fix redirection for subdomains.