Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
Ok i now have the two domain names working 90%
http://www.edition30.co.uk works throughout as does http://www.vagweb.co.uk
My remaining problem is this, when you login or out it generates a redirect link, this redirect link is based on a database entry which currently is "www.vagweb.co.uk/forums"
hence it builds the redirect link from that. So when you login, if if you are browsing via www.edition30.co.uk you get redirected back to vagweb.co.uk
How can i make it so it just takes whatever the domain name you are using?
there probably is a really simply answer, i have tried changing the db entry to "/forums"
but thats doesnt work, get page cannot be displayed for some reason, any clues?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Tried ./Forums?
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
no i will try that now, that did cross my mind
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Although thinking about it, edition30.co.uk/forums doesn't actually technically exist so it may never work?
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
page cannot be displayed
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
quote: Originally posted by James
Although thinking about it, edition30.co.uk/forums doesn't actually technically exist so it may never work?
it does exist, goto it
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
also note that when i change it to /forums or ./forums it doesnt work with using the normal vagweb.co.uk domain either
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Oh yeah it does exist.
Ok next idea........
Read in the Referrer URL, if its edition30.co.uk, get a value from the db, if its vagweb.co.uk, get a different one.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
is there a php command for the refferer url?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
$_SERVER['HTTP_REFERER']
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
You will have to play with it a bit, i'm not sure exactly what it gives you.
|
dave17
Member
Registered: 3rd Sep 02
Location: Greater London
User status: Offline
|
quote: Originally posted by Steve
I have a small problem
My Penis
Nothing new here then.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
ok thats kind of working but not quite because it generates a random sid so impossible to get a fixed referrer each time, how do you check just to the first / ?
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
ie
http://www.edition30.co.uk/forums/index.php?sid=f74354de1d8a61aae117d29179fd89b9
or
http://www.vagweb.co.uk/forums/index.php?sid=f74354de1d8a61aae117d29179fd89b9
could be generated which would work if i could get a fixed value to perform an IF command
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
code:
<?
if(strpbrk($_HTTP['Refferer'],"edition30"){
header("location: http://www.edition30.co.uk/page.php");
}else{
header("location: http://www.vagweb.co.uk/page.php");
}
?>
Or something like that.
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
Yeah you can either split it, or do it how ed says by checking to see if a string is in the url.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
strpbrk is a function, i dont have that function defined anywhere
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
You don't need to define it, its built into PHP.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
It's a built in function in PHP5.
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
says its undefined?
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
You using PHP4?
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
Should have something for it. You use it for smileys.
[Edited on 20-02-2007 by ed]
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
must be, im using whatever my hosting company is using lol
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
<?
phpinfo();
?>
|
James
Member
Registered: 1st Jun 02
Location: Surrey
User status: Offline
|
code:
<?
if(stripos($_HTTP['Refferer'],"edition30") > 0)
{
header("location: http://www.edition30.co.uk/page.php");
}else{
header("location: http://www.vagweb.co.uk/page.php");
}
?>
Try that.
|