giphy.com redirection

RapidVideo

Affiliate Rep
 
 
 
 
 
 
0   0   0
Joined
May 20, 2019
Messages
57
Credits
575
I am figuring how they did work with that redirecting images on their imagehost:


hxxps://media.giphy.com/media/X8omQqfFyeq1a/giphy.gif

embed img:



When the url is clicked, you will get a simple html page.
 

DropAPK

Affiliate Rep
 
 
 
 
0   0   0
Joined
May 24, 2019
Messages
10
Credits
624
I am figuring how they did work with that redirecting images on their imagehost:


hxxps://media.giphy.com/media/X8omQqfFyeq1a/giphy.gif

embed img:



When the url is clicked, you will get a simple html page.
I think they use .htaccess to redirect image to html page and show same image that's try to open.

It's take 0 second to redirect from image to html page

if you notice page reload when image load done.
 

Igutin

 
 
 
 
0   0   0
Joined
May 23, 2019
Messages
16
Credits
434
The way they did it is actually quite clever but also very simple if you think about it.

The client sends an Accept header with each request. If the client specifically expects

text/html
then the site will actually respond with the HTML or redirect to the main page. If it expects an Image or */* MIME Type, it will respond with the picture.

Here is an example:
 
Top