Answer the question
In order to leave comments, you need to log in
How to make all links go through the site first?
Website in django.
For example, in YouTube, if you post a link, then it first passes through the site itself, then it goes redirect.
External link in the comments -
https://example.com
On YouTube it will be something like this -
https://www.youtube.com/redirect?event=video_descr... <token here>example.com
How to do the same on my site ?
So that all links posted by users first pass through the site itself, and then there is a redirect.
Through JavaScript to replace href="" throughout the html page or is there a better way through django itself?
Answer the question
In order to leave comments, you need to log in
Analyze the sent data, extract links from them and replace them with your own.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question