0

I am looking for a way to redirect a pdf file in a sharepoint library to a different pdf in the same library? For example, if the old file is ABC.pdf and the new file is 123.pdf - we want external users who have linked to or bookmarked the old file ABC.pdf to be redirected to 123.pdf instead of getting a 404 error if we just delete the old file.

I found an article to redirect pdfs if they were in a directory on a website - http://moz.com/community/q/301-redirect-on-a-pdf-docx-files

but I need a technique for files within a sharepoint library.

Thank you

I have additionally found a few other ideas - but I need to do more research with regards to URL rewriting: http://forums.iis.net/t/1199665.aspx http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module http://support.microsoft.com/kb/2818415

  • have you found any solution that works for this? I tried using the link to content document type, but the problem is that is creates a redirect page (.aspx), so the old/obsolete document link still results in 404 – kbbs Apr 30 '15 at 10:08
0

We had this problem when we remodeled our site, so any bookmarks got 404. Our solution (back to SP 2007) was a) to create a list with the new and old URLs and b) custom made 404 page that redirected to the new url.

Actually, we saved all 404 to this list ( as old url) and for the first 6 months we went and fill up the new url.

I guess you can do the same: See in http://www.learningsharepoint.com/2013/06/17/replace-default-pagenotfounderror-aspx-with-custom-error-page-in-sharepoint-2013/ option 2.

  • Thank you for the reply I will take a look. Unfortunately, from your solution, it sounds like there is not a way to redirect but instead deal with the 404. – Sue White Sep 3 '14 at 0:31
  • Link to a document is another solution – XristosK Sep 3 '14 at 5:35
  • Hello XristosK -I am not sure what you mean by "Link to a document is another solution" Can you elaborate? Thank you. – Sue White Sep 3 '14 at 15:58
  • There's a content type named link to a document. You could find a solution to your problem in collaboris.com/blogs/collaboris-blog/policy-management/2013/04/… – XristosK Sep 3 '14 at 16:09
0

I have trouble understanding this...

"I am looking for a way to redirect a pdf file in a sharepoint library to a different pdf in the same library?"

If it is in the same library anyway, wouldn't you be able to just rename ABC.pdf to like ABC-OLD.pdf and rename 123.pdf to ABC.pdf? Granted it is a lot of work, I would tend to think it should preserve all the links just fine.

As a matter of fact, I did something similar on a library level at one time, and took the effort to make sure they links translate even though we switch libraries. I just renamed the old library a different name and gave the new library the name the original library had and retained the original folder structure.

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.