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-
I think I've got it figured out...
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /test
RewriteRule ^test/?(.*)$ $1 [C]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1?%{QUERY_STRING}#MYVALUE [NE,L,R]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} /test
RewriteRule ^test/?(.*)$ $1 [C]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1?%{QUERY_STRING}#MYVALUE [NE,L,R]
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.