Both Question Mark(?) and Pound (or hash - #) have specific meaning in a URL.
When you say you want to change one URL to another, it just "sounds" wrong!
I really can't help you as I don't have access in my role to the server documents. IF you were doing it with a n aplication I would take the URL and parse replacing teh ? with #.