Title: Files and redirection
Last modified: October 25, 2017

---

# Files and redirection

 *  Resolved [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/)
 * Hi everyone,
 * I want to do a 301 redirection for a PDF file, for example:
    /wp-content/uploads/
   2017/09/my-old.pdf [http://www.site.com/wp-content/uploads/2017/10/my-new.pdf](http://www.site.com/wp-content/uploads/2017/10/my-new.pdf)
 * But the redirection does not work.
    Do you know why ?
 * Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9618683)
 * Does the file exist? If so you’ll need to delete it otherwise your server will
   serve it directly before Redirection has chance to do anything else.
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9619095)
 * Precisely, the old PDF file no longer exists.
    I want to add this redirection
   to avoid a 404 page.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9624071)
 * I can’t confirm this without having a real URL to test against but your server
   is probably still trying to serve the PDF directly.
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9625829)
 * I created a test environment and when I delete the file, the server displays 
   a 404 error in WordPress page (with the graphic theme).
    On the other server,
   I have a 404 error in Apache (in plain text).
 * I guess the problem comes from there?
    -  This reply was modified 8 years, 7 months ago by [meneldil](https://wordpress.org/support/users/meneldil/).
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9626000)
 * Note that on my test environment, the redirect works.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9627117)
 * Yes, that sounds exactly like the problem – your test environment is handling
   the PDF through WordPress where as your live environment is handling it from 
   the server. If you have control over your live server then you can look in the.
   htaccess/rewrite rules file to see what rules you have there. If you don’t have
   control over your server then you’ll need to put the redirect inside the .htaccess/
   rewrite rules file. Redirection can export the rules for you from the import/
   export page.
 *  Thread Starter [meneldil](https://wordpress.org/support/users/meneldil/)
 * (@meneldil)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9627126)
 * Ok, I’ll watch this.
    Thank you very much!
 *  [manakuke](https://wordpress.org/support/users/manakuke/)
 * (@manakuke)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9655573)
 * I am having a similar issues. The old PDF file:
    [http://www.lasalle.edu/wp-content/themes/financialaid/pdfs/christianbrothers/CBS_app.pdf](http://www.lasalle.edu/wp-content/themes/financialaid/pdfs/christianbrothers/CBS_app.pdf)
 * is supposed to re-direct to:
    [http://www.lasalle.edu/financialaid/scholarships/christian-brothers-scholarship/christian-brothers-scholarship-application/](http://www.lasalle.edu/financialaid/scholarships/christian-brothers-scholarship/christian-brothers-scholarship-application/)
 * I am running a multisite and the origianl PDF file was included in the theme,
   which I’ve since deleted from the server. Redirection is running on the root,
   not the sub-site.
 * Thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Files and redirection’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

## Tags

 * [file](https://wordpress.org/support/topic-tag/file/)
 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [wp-content](https://wordpress.org/support/topic-tag/wp-content/)

 * 8 replies
 * 3 participants
 * Last reply from: [manakuke](https://wordpress.org/support/users/manakuke/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/files-and-redirection/#post-9655573)
 * Status: resolved