corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » I have a small problem


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author I have a small problem
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:40   View Garage View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 10:43   View User's Profile U2U Member Reply With Quote

Tried ./Forums?
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:43   View Garage View User's Profile U2U Member Reply With Quote

no i will try that now, that did cross my mind
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 10:44   View User's Profile U2U Member Reply With Quote

Although thinking about it, edition30.co.uk/forums doesn't actually technically exist so it may never work?
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:45   View Garage View User's Profile U2U Member Reply With Quote

page cannot be displayed
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:47   View Garage View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:48   View Garage View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 10:52   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 10:53   View Garage View User's Profile U2U Member Reply With Quote

is there a php command for the refferer url?
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 10:53   View User's Profile U2U Member Reply With Quote

$_SERVER['HTTP_REFERER']
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 10:54   View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 10:58   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Steve
I have a small problem



My Penis


Nothing new here then.
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:02   View Garage View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:02   View Garage View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 11:11   View User's Profile U2U Member Reply With Quote

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
20th Feb 07 at 11:12   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:22   View Garage View User's Profile U2U Member Reply With Quote

strpbrk is a function, i dont have that function defined anywhere
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 11:23   View User's Profile U2U Member Reply With Quote

You don't need to define it, its built into PHP.
ed
Member

Registered: 10th Sep 03
User status: Offline
20th Feb 07 at 11:24   View User's Profile U2U Member Reply With Quote

It's a built in function in PHP5.
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:24   View Garage View User's Profile U2U Member Reply With Quote

says its undefined?
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 11:25   View User's Profile U2U Member Reply With Quote

You using PHP4?
ed
Member

Registered: 10th Sep 03
User status: Offline
20th Feb 07 at 11:26   View User's Profile U2U Member Reply With Quote

Should have something for it. You use it for smileys.

[Edited on 20-02-2007 by ed]
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
20th Feb 07 at 11:26   View Garage View User's Profile U2U Member Reply With Quote

must be, im using whatever my hosting company is using lol
ed
Member

Registered: 10th Sep 03
User status: Offline
20th Feb 07 at 11:26   View User's Profile U2U Member Reply With Quote

<?
phpinfo();
?>
James
Member

Registered: 1st Jun 02
Location: Surrey
User status: Offline
20th Feb 07 at 11:35   View User's Profile U2U Member Reply With Quote

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.

  <<  1    2  >>
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
What's the loudest backbox ? Ajones_17 Help Zone, Modification and ICE Advice 8 790
5th Oct 04 at 09:12
by Ajones_17
 
power caps chris_clare Help Zone, Modification and ICE Advice 13 754
10th Mar 05 at 10:54
by AdiSRI
 
exhaust question (powerflow) Dan General Chat 23 817
11th May 05 at 23:43
by Stoneyginger
 
supercharging? Basscrazy Help Zone, Modification and ICE Advice 12 700
18th Dec 05 at 20:17
by combatvauxhall
 
LMF Vauxhall deception- shoot aftersales service abdus General Chat 87 4642
29th Jun 06 at 18:12
by abdus
 

Corsa Sport » Message Board » Off Day » Geek Day » I have a small problem 28 database queries in 0.0212941 seconds