problem with redirect

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dalton565
Forum Newbie
Posts: 5
Joined: Wed Jan 30, 2008 8:17 am

problem with redirect

Post by dalton565 »

Hey guys, just moved my site from local to webserver and i have the following problem

My logout link does 2 things
1. Log user out of forum phpbb
2. Log user out of main site

This is achieved by loading one url then applying a redirect, however now that i have moved this from my local machine to the online webserver, when i click logout it is pointing the user to localhost

link to my site - http://www.hookedonpike.co.uk/index.php
test details - username - test1 password - qwerty

the code for my logout link looks like this

Code: Select all

$appendLogout = append_sid($phpbb_root_path . 'login.php?logout=true&redirect=http://www.hookedonpike.co.uk/logout.php&sid=' . $userdata['session_id']) ;
Anyone know an easy way to fix, wrecking my head as im new to php
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: problem with redirect

Post by John Cartwright »

and your question is?
dalton565
Forum Newbie
Posts: 5
Joined: Wed Jan 30, 2008 8:17 am

Re: problem with redirect

Post by dalton565 »

is there any way i change the above code so it wont redirect me to localhost
anto91
Forum Commoner
Posts: 58
Joined: Mon Mar 10, 2008 10:59 am
Location: Sweden

Re: problem with redirect

Post by anto91 »

dalton565 wrote:is there any way i change the above code so it wont redirect me to localhost
Did you reinstall the phpbb system, because im guessing that its redirect to document root witch is LOCALHOST since that is what you used when you installed it on your local server.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: problem with redirect

Post by Zoxive »

What is your code doing with $_GET['redirect'] because in your post you have the full url, but on your website you do not.
Post Reply