There is a working site on Joomla, for example, on the shop.site.ru subdomain. For modifications and testing, we copied it to a new subdomain test.site.ru, but the images folder was not copied due to its large size (thousands of photos from the Internet component store).

Thus, there are no photos on test.site.ru, but I would like to have them there.

What to write in .htaccess so that all references to files and subdirectories in the folder test.site.ru/images are redirected to shop.site.ru/images, i.e. in fact, to make so that on our test site test.site.ru files from the subdomain folder shop.site.ru are displayed ???

    1 answer 1

    Try this:

    RedirectMatch "^/images/(.*)" "http://shop.site.ru/images/$1" 
    • Nope, it does not work unfortunately ( - Enshtein
    • is mod_alias connected? If not, then try now for mod_rewrite to write. - Nikola Tesla
    • a solution like this helped: RewriteRule ^ (images /.*)$ shop.site.ru/$1 [R = 301, L, NC] - Enshtein
    • one
      Yes, I overdid it with the site address, corrected it in the answer. - Nikola Tesla