Yes, but you must strip the fragment. Because if you are at "?foo=1#bar" and are sent to "#bing", you get "?foo=1#bing".