I had to setup a redirect the other day with a hashtag. Whenever a visitor hit a specific URL, I wanted to redirect them to another URL but I also wanted to include a hashtag to indicate where they came from when tracking the information in Google Analytics.
It appears the secret is the NE flag otherwise the
# gets escaped as
Example of htaccess rule to Redirect with Hashtag
RewriteRule ^(?i:redirectme)$ http://example.com/common/#from-redirectme [NE,R=301,L]