How can i rewrite part of an URL to alter the anchor or has tag to an ampersand? Example:
http://www.test.com/?database=demo#option=set
changed to:
..website../?database=demo&option=set
Notice the change from #option to &option.
I know the # is only processed client side (it never reaches server), so Javascript seemed like the only way to go.
Can Javascript change this on the fly, even without reloading the page? That would eliminate an IF check to find if an instance exists. A reload if the page would work to1...
Thanks for your time and expertise.
"Can Javascript change this on the fly, even without reloading the page?"
No. What you think is a cosmetic change, in reality means totally different resource as represented by URL, because &option
would mean new GET parameter.
So page redirect would be needed in order to change this part of URL.