Redirect all pdfs from one folder to another
-
I am trying to get all google links that pointed to the old static html site’s PDF files to the new WordPress site’s same name PDFs.
So for example: if you click on a link that shows up in google as: https://www.haregroup.com.au/generator/assets/How_was_your_last_pay_review_19Jan10.pdf, I would like to have it go to https://www.haregroup.com.au/wp-content/uploads/2021/01/How_was_your_last_pay_review_19Jan10.pdf instead.
I tried to follow your instructions, and have tried this regex setup:
Source URL:
^generator/assets/(.*)
Target URL:https://www.haregroup.com.au/wp-content/uploads/2021/01/$1
But as you can see if you try the google link: https://www.haregroup.com.au/generator/assets/How_was_your_last_pay_review_19Jan10.pdf, it just goes to a 404 page error.
Can you give me some help on how to set this up?
PS: I do have .htaccess code that is forcing a https://, but I don’t know if that is interfering with this new regex attempt at redirecting PDFs through your plugin. (It doesn’t seem to bother my other standard 301 redirections from old html pages)
- This topic was modified 3 years, 5 months ago by . Reason: fixing links display
- This topic was modified 3 years, 5 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Redirect all pdfs from one folder to another’ is closed to new replies.