0

I have an url like (result of authenticating via facebook with hybridauth):

http://localhost/work/auth/validate.php?service=Facebook#_=_

Within it I am trying to redirect to:

header("location:../user/".$_SESSION['user']['profile_url_name']);

Where $_SESSION['user']['profile_url_name'] = 'Test-User' However when the redirection occurs, it appears as:

http://localhost/work/user/Test-User#_=_

I don't know why or how the #_=_ appears in the redirection, but I just want to get rid of it. Any solutions?

Bluemagica
  • 5,000
  • 12
  • 47
  • 73
  • Are you tried `echo $_SESSION['user']['profile_url_name'];` to see what is the value? – Emilio Gort Sep 29 '13 at 06:46
  • I've never heard of that happening by itself. – Barmar Sep 29 '13 at 06:46
  • @EmilioGort yes, I also tried to hard-code the value in, but it doesn't matter if I redirect to even google.com, all direct redirects through php from that page seems to contain those extra characters – Bluemagica Sep 29 '13 at 06:50
  • see the @hakre's link, `#_=_` seem be in the .htacces – Emilio Gort Sep 29 '13 at 06:53
  • 1
    @downvoter Why the downvote? Please explain a bit so that I can improve my self – Bluemagica Sep 29 '13 at 06:54
  • @Bluemagica: See my previous comment (you might need to refresh the browser), the link with more info is here: http://meta.stackexchange.com/q/66377/147909 - The key to ask a question is to ask to understand first - not just fix (or what you think would be a fix). – hakre Sep 29 '13 at 06:55
  • @hakre if there is no solution in php, then is there any alternate solution, like using javascript redirect? Also that post you linked to about the 301 redirect seems to be about keeping the #part, not removing it. – Bluemagica Sep 29 '13 at 06:56
  • @Bluemagica: Whatever a solution might be, it requires you to understand the topic first. As you've been written in your question that you're not interested in understanding what is going on, I'm not interested in spoon-feeding your with further information next to the link I've already provided to you. I also don't think it's necessary for the question itself. No need for a Q&A site to duplicate this. – hakre Sep 29 '13 at 06:58
  • @Hakre I don't want this to be a flame war but please understand, I never said I don't want to know what's happening. All I meant to say is that my goal is to get rid of those. – Bluemagica Sep 29 '13 at 07:01
  • Well, if you admit to not understand (and I don't have a problem with that), how can you say you already know your want to get rid of those? You understand what I mean? (not a flame war at all) – hakre Sep 29 '13 at 07:02
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/38259/discussion-between-bluemagica-and-hakre) – Bluemagica Sep 29 '13 at 07:03
  • @hakre It would be good if you know, share the knowledge with us, I also want to know how it's happen – Emilio Gort Sep 29 '13 at 07:04
  • @EmilioGort: Click the chat link. – hakre Sep 29 '13 at 07:05
  • @Bluemagica I think you should summarize the chat into an answer and accept that as the answer, that way others can benefit from it without digging through the whole discussion. – Simon Groenewolt Mar 01 '14 at 20:10

0 Answers0