How does a web proxy work?

This isn't really a "proxy".. but I guess a "proxy link" kind of makes sense in a way. This is more often referred to as a redirect or a url shortener (although in this case it's not a shortener, but the concept is the same)

Let's say you want to take this link:

https://www.google.com/maps/place/The+Great+Pyramid+at+Giza/@29.9792345,31.1320132,17z/data=!3m1!4b1!4m2!3m1!1s0x14584587ac8f291b:0x810c2f3fa2a52424

And turn it into:

http://somewebsite.com/go.php?url=A1B2C3


You submit the long google maps link into a web form over at somewebsite.com. That website generates a randomized string of letters and numbers, and associates it with your link (it isn't always randomized, but let's ignore that). Those two things are then inserted into a database.

The database now has a table that looks like this, with a whole bunch or URLs and "randomized" short codes:

ShortCode URL
A1B2C3 https://www.google.com/maps/place/The+Great+Pyramid+at+Giza/@29.9792345,31.1320132,17z/data=!3m1!4b1!4m2!3m1!1s0x14584587ac8f291b:0x810c2f3fa2a52424
Z7Y6X5 https://www.google.com/maps/place/Grand+Canyon+National+Park/@36.1069652,-112.1151859,17z/data=!3m1!4b1!4m2!3m1!1s0x873312ae759b4d15:0x1f38a9bec9912029

Now, let's say you go to http://somewebsite.com/go.php?url=A1B2C3

When you enter that link, the webiste looks for the value of the "url" tag (url=A1B2C3). It then queries the database, and pulls out the URL that's tied to the shortcode in the link you clicked on. From there, it just forces the browser to redirect you to the URL using some special code that's specifically designed to redirect.

/r/NoStupidQuestions Thread