V
V
voron292017-01-14 11:28:09
htaccess
voron29, 2017-01-14 11:28:09

The domain and the name of the folders have changed, and the src of pictures in articles can take a long time to change. Can this be solved with htaccess for example?

Hello. Previously, access to materials on the site was via a link like site.ru/dir/material_page.html.
I created a subdomain like dir.site.ru and now the materials are available here: dir.site.ru/material_page.html (there is no /dir/ in the address).
In articles on pictures, old SRCs of the /dir/img/image.jpg type are given. Now the pictures are physically located here dir.site.ru/img/image.jpg and, of course, the pictures are not displayed on the page, because there is no dir folder in the path now.
Is it possible to make sure that the SRC is not changed in each article, but the pictures are displayed on the site (for example, using htaccess or something else)?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-01-14
@NeiroNx

If you have a static site, then you need to use relative paths for images: img/image.jpg - there is an img folder in the folder with the page - pictures in it. It will work before and after the domain change

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question