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.
Precisely, the old PDF file no longer exists.
I want to add this redirection to avoid a 404 page.
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.
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 6 years, 5 months ago by meneldil.
Note that on my test environment, the redirect works.
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.
Ok, I’ll watch this.
Thank you very much!
I am having a similar issues. The old PDF file:
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/
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?