Answer the question
In order to leave comments, you need to log in
Loading an image from another site using .htaccess?
There is a site, abc.ru, it has a picture 1.jpg, the final form is abc.ru/1.jpg
There is a site 123.ru, it picks up a picture from the address abc.ru/1.jpg through .htaccess
and can display it under any name , for example 123.ru/jjfjfejefj.jpg
What needs to be written in this .htacces located on 123.ru
Answer the question
In order to leave comments, you need to log in
I could be wrong, but this cannot be done using htaccess alone.
You can redirect via RewriteUrl to the php script
/jjfjfejefj.jpg to index.php?file=jjfjfejefj.jpg
and already in the script do something like:
header('Content-Type: image/jpeg');
echo file_get_contents('abc.ru/1.jpg');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question