I need to issue a redirect, using .htaccess, to a URL with a fragment (also known as an anchor), but it's automatically escaping the #.
At the moment I want a hard-coded fragment, but for the sake of others if you know how to take it from the URL too that would be good.
Ideally I should be able to use QSA as well.
For example:
http://www.exameple.com/test?foo=bar
should become
1) http://www.example.com/?foo=bar#MYVALUE
or taking the fragment from the url:
2) http://www.example.com/?foo=bar#test
My (non-working) code looks like this:
RewriteRule /test http://www.example.com/#MYVALE [R,QSA]
I think I've got it figured out...
It's a bit poor having to do it once for HTTP and again for HTTPS - I'll see if I can find a way around that.