B
B
barmy712019-04-16 09:13:59
WordPress
barmy71, 2019-04-16 09:13:59

How to 301 redirect all images from one folder to another?

Hello!
Please help me to solve the following problem.
There was a site on netcat. Moved it to wordpress. After the transfer, YandexWebmaster began to pile up heaps of 404 errors on the pictures that were in the corresponding netcat folder.
Actually the question is: how to set up a redirect of all pictures from the old folder to the new one?
For example:
when requesting domain.ru/netcat_files/280/525/image.jpg, did domain.ru/wp-content/uploads/image.jpg open?
Thanks in advance to everyone who responds!
Sincerely, Mikhail.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dodo512, 2019-04-16
@barmy71

RewriteRule ^netcat_files/280/525/(.+) /wp-content/uploads/$1 [R=301,L]

V
Viktor Taran, 2019-04-16
@shambler81

let's be a little more specific
285 - is it a directory it changes? is it from numbers? minimum maximum number of characters ?
525 is also a directory, does it require numbers?

B
barmy71, 2019-04-16
@barmy71

285 is the directory it changes? is it from numbers? minimum maximum number of characters ?
525 is also a directory, does it require numbers?

Absolutely all the pictures were in the /netcat_files/280/525/ directory, now they are in /wp-content/uploads/. Those. the folder structure in the path to the image is unchanged.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question