• Resolved s0206

    (@s0206)


    Hi

    It is possible to use a 301 redirect for a url that links to a document?

    For example I have a word doc stored on the server and there are a few places in the website that link to that particular document. But the file is old now and needs replacing with the latest version which is a pdf. The original url ranks highly on google therefore I do not want to lose that.

    Is it possible to use 301 redirect here and if so what is the correct syntax?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I have not tried to redirect a document before, however it should be the same general 301 re-direct. Try adding this to your .htaccess code:

    redirect 301 /old/old.htm http://www.you.com/new.htm

    The only issue is that depending on any plugins you have installed, sometimes manual redirects can make the page not display properly. Before adding any code to the .htaccess make sure you have saved the original just in case.

    If that doesn’t work let me know, I tested it for a page and it worked but updating a .pdf may require slightly different coding.

    Kevin

    Thread Starter s0206

    (@s0206)

    Thanks Kevin really appreciate your reply and the advice.

    I have tried the solution you suggested but it doesn’t seem to make a difference. I’m not even sure to be honest if it’s posisble to redirect a document in this way.

    I have used the above code in the past to redirect pages and that works great but not having much luck with documents 🙁

    Thread Starter s0206

    (@s0206)

    Just an update: I got it working using the usual 301 redirect method. I made a mistake and placed the code in the wrong part of my htaccess file, doh!

    Hope that helps others 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘301 redirects for documents’ is closed to new replies.