Mobile app version of vmapp.org
Login or Join
Shakeerah822

: 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.

@Shakeerah822

Posted in: #Http #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 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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

3 Comments

Sorted by latest first Latest Oldest Best

 

@Nickens628

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.

10% popularity Vote Up Vote Down


 

@Hamaas447

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/.

10% popularity Vote Up Vote Down


 

@Sarah324

The second one can simply be a parameter in the URL.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme