: HTTP occurring twice in a URL I ran into a website today that had two URLs and I'm completely stunned. The website, not to be specific, has a full address of http://example/cat/http://example/dog.
I ran into a website today that had two URLs and I'm completely stunned. The website, not to be specific, has a full address of example/cat/http://example/dog. I will say that the first part is a randomly generated ad that pops up, but regardless isn't going to two addresses the equivalent of being at two different houses at the same time i.e. impossible? Anyhow, I just wanted some clarification on how it works.
And before you ask, the site is not exactly something that I would paste on an affluent forum thus the reason I have left it out.
More posts by @Shakeerah822
3 Comments
Sorted by latest first Latest Oldest Best
People also often see "http" in their access logs when the forget the colon in a link to an external site. For example on the page example.com/finder/findstuff is the following HTML:
<a href="http//www.google.com/">Search Google</a>
Due to the missing colon, this will result in the visitor being sent to example.com/finder/http//www.google.com/ when clicking on the link.
Your example URL, example/cat/http://example/dog, points to a page accessed with the http protocol, on the host example, with the path cat/http://example/dog. It's perfectly valid for the path part of a URL to contain elements that look like the protocol and hostname parts of another URL.
One relatively prominent example of a legit site using such URLs is archive.org's Wayback Machine. For example, to see what webmasters.stackexchange.com/ looked like in late 2010, you can go to web.archive.org/web/2010/https://webmasters.stackexchange.com/.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.