301 Redirect Module is not working in pdf to pdf redirect, did anyone face this problem yet?
ex - abc.com/.../xyz.pdf to abc.com/.../cdc.pdf
Does anyone has any idea?
Or is it possible that it is the problem of ~ sign?
Make sure that you have added the "pdf" extension to the list of "Allowed Extensions" for the
FilterUrlExtensions processor of the
<preprocessRequest> pipeline. If you don't do this, Sitecore will not handle requests for PDF files, as the PDF extension is not allowed by default.
You can add "pdf" to the list of allowed extensions via the following patch file:
<?xml version="1.0"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> <preprocessRequest> <processor type="Sitecore.Pipelines.PreprocessRequest.FilterUrlExtensions, Sitecore.Kernel"> <param desc="Allowed extensions (comma separated)">aspx, ashx, asmx, axd, pdf</param> </processor> </preprocessRequest> </pipelines> </sitecore> </configuration>
I helped a coworker with the same issue two days ago, and his solution used dashes (-) instead of tildes for media paths. He was able to resolve the issue with the above patch file, alone.
I also helped a user on the Sitecore Community site with this same issue, yesterday. In his case, the above patch file, alone, didn't solve the issue, but once he remove the tilde (~) from the target URL it worked.