G
G
Gizaster G2019-06-05 12:44:53
Laravel
Gizaster G, 2019-06-05 12:44:53

After migrating a Laravel project to a new server/domain, the image links point to the old domain. How to fix?

Hello. I'm just starting to learn php, and maybe I have a stupid question:
- I have a working project on Laravel, bound to a domain (for example app.domain.com)
- I have a second server, no domain, just a static IP (for example 123.123.123.123)
I copied the project to a new server, set it up (changed the domain to ip in the .env , .htaccess files, uploaded a fresh dump to the database, set up Apache), and, apparently, all application functions work properly, except for images, links to which are stored in mysql database.
That is - all pages open and perform their functions without failures, the background image is also displayed as expected, but not user photos.
I checked the link format in the database, only the name of the image file (image_123.png) is recorded there.
But if I open a page that contains this image, the image does not load, and the image link leads to the old domain ( https://app.domain.com/blabla/blabla/img_123.png)
Please tell me where to look and what to change to get the new one the server took the picture from itself? ( https://123.123.123.123/blabla/blabla/img_123.png)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question