Hello, odd problem here.
I have people coming into my site directly to PDF files that google as indexed. Such as:
www.mysite.com/pdf/file.pdf
I wanted to write a wrapper in php so that when people come in, they will view the pdf in an embedded page with our header and footer on it.
Something like this:
www.mysite.com/page.php?pdf=file.pdf
this just takes the name of the file and embeds it on the page.
I then added this rewriterule:
Rewriterule(.+\-.pdf)$ /page.php?pdf=$1 [L]
Without the rewrite rule, the php page for embeding the PDF works fine, however when I turn it on, it no longer works.
Does the rewrite rule actually effect the link inside the page code? Such as:
<embed src = 'file.pdf' >
is that link to the file inside the code also being changed by the rewrite rule?