7
7
78752014-04-14 12:35:06
Domain name market
7875, 2014-04-14 12:35:06

301 redirect for images from subdomain to maindomain

Hello!
Please tell me how to redirect images
from the address:
old.site.ru/uploads/posts/<...>/img.jpg
to
site.ru/uploads/posts/<...>/img.jpg
The situation is that you need to make a copy of the site, but with a different design, and the images can only be in one folder, on the main domain.
Thanks in advance for your help!)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
7875, 2014-04-14
@7875

Found the answer myself.
In my case, it was easier to redirect the entire uploads folder

RewriteRule ^uploads/(.*)$ http://new-site.ru/uploads/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question