Reputation: 12093
It seems that after a 302 direct, the browser preserves the fragment identifier:
/foo#/bar/baz
returns 302 to /login
, but browser shows:
/login#/bar/baz
How do I get the browser to redirect and clear the fragment so it just shows:
/login
Upvotes: 1
Views: 213
Reputation: 12093
It seems that if the server adds '#' to the end of the redirect URL it will override any existing fragment. Of course, the redirect URL must tolerate an empty fragment, but if so, the redirect header can simply be:
Location /login#
Works for me.
Upvotes: 1