I am trying to rewrite a bunch of pdf URLs. Most are already working, but I am having trouble with a few of them. The problems all contain #page=xx in the URL. I want the #page=xx to be matched, and I do not want that string appended to the destination.
For example:
RewriteRule ^/pdfdir/test.pdf$ http://newlocation.com/dir1/newdir/abc.pdf [R=301,L]
RewriteRule ^/pdfdir/test.pdf#page=3$ http://newlocation.com/dir1/newdir/def.pdf [R=301,L]
When I try to access my site with /pdfdir/test.pdf, it matches and rewrites correctly. Now I want the request for page 3 inside test.pdf to go to a complete separate def.pdf in the new location. Right now, it is appending the #page=3 to the first match destination, which is abc.pdf.
Any suggestions would be most appreciated.
thanks
steve