I
I
Ivan2019-10-19 20:49:50
Nginx
Ivan, 2019-10-19 20:49:50

How to replace all urls on the fly?

Good evening! Tell me if the web servers have a feature that can replace all links on the fly.
You need to do this only for pictures and statics. I really don’t want to look for all this in the engine, I need a simpler solution.
For example, we have the address site.ru/uploads/image.jpg , so we need to replace it with cdn.site.ru/uploads/image.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2019-10-20
@ky0

Make a separate one locationfor images and add it there rewriteon the CDN, since you don’t want to change it inside the site. And do something about your previous question on this topic - either mark as solved or delete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question