In trying to rewrite
site-search.html?searchword=search%20term
as
advanced-search#q=search%20term
I always end up with advanced-search#q=%3Fsearchword%3search%20term
The %3Fsearchword%3
portion is mysteriously appended to the generated URL right before the search term.
The rule I have in place look as follows:
RewriteCond %{REQUEST_URI} ^/site-search\.html$
RewriteCond %{QUERY_STRING} ^searchword=(.*)$
RewriteRule ^(.*)$ http://www.example.com/advanced-search#q=%1 [R=301,L,NE]
It is worth mentioning that it makes no difference what I put after "q=". The same error or a slight variation of to will happen regardless.