1

A number of pages on my site require the user to be logged in, so when he tries to access one of these pages, the page address is saved in session and the user is redirected to the login page, and after logging in he is redirected back to that page.

The problem is if a backbone router hash-tag is present in the address, it gets transferred to the login page address. Say the user tried going to: www.mydomine.com/messages.php#4 he gets redirected to www.mydomine.com/login.php#4

How do I prevent that, I just want the hash and what follows it to go, I don't need keeping it. redirecting the user back to www.mydomine.com/messages.php (with out the "#4") is just fine.

Khalid Dabjan
  • 2,697
  • 2
  • 24
  • 35
  • This has been covered multiple times, e.g. here http://stackoverflow.com/questions/5283395/url-hash-is-persisting-between-redirects Basically some browsers keep the hash after 3xx redirects – jakee Sep 09 '13 at 19:28
  • 1
    But there's nothing about how to avoid it. – Khalid Dabjan Sep 10 '13 at 09:12

0 Answers0