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/">
      <processor type="Sitecore.Pipelines.PreprocessRequest.FilterUrlExtensions, Sitecore.Kernel">
        <param desc="Allowed extensions (comma separated)">aspx, ashx, asmx, axd, pdf</param>

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.

| improve this answer | |
  • yes but content entry is already there so we need to keep ~ sign. So I think customization is the best way to do it, right? – Gaurav Agarwal Nov 18 '16 at 17:16
  • When you say "content entry" in this instance, what are you referring to? – Zachary Kniebel Nov 18 '16 at 17:19
  • Actually our site is live..and client has already entered the content. – Gaurav Agarwal Nov 18 '16 at 17:32
  • I suppose that I am just not understanding how the site being live or the fact that content has been entered by the client impacts whether or not you need to keep the tilde (~). Can you please explain? – Zachary Kniebel Nov 18 '16 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.