¿Por qué esta URL agrega el nombre de mi sitio al hacer clic en él?

I noticed some 404's in my logs this morning so I took a look and found out that some links in my posts are adding my home page to the url that I linked to, thus creating a 404 . In the 2nd paragraph I link the word "readers" to one of our readers sites, and you'll see it adds my home page to the url and you get a broken page. If you view the source, this link isn't there. It's very strange, and happening in other places on my site as well. Any ideas what's going on, and how to fix this? Thanks.


preguntado el 09 de marzo de 12 a las 17:03

3 Respuestas

Since the URL doesn't start with http:// (or similar) it is a relativo URI.

Include the scheme in the URI.

respondido 09 mar '12, 17:03

Rather than linking to www.pasticheyoga.com, enlace a http://www.pasticheyoga.com

Porque no hay http://, https://, etc at the start of the URL, this URL is a relative URL, not an Absolute URL.

respondido 09 mar '12, 17:03

ahhh..I knew it had to be a simple mistake. Thanks! - Rick Smith

There are 2 types of links in relation to your site

  • Absoluto
  • Relativo

When you add links in your blog post to web sites/pages that are (in simple words) not the same site as the blog, then you are adding external links and need to specify the links as Absoluto. To do so, you begin with the protocolo, generalmente http:// or https://, followed by the address of the site/page. So for instance to link to Google.com your link would have to be http://www.google.com/

When you do not add a protocol/scheme in the link url, most browsers assume it to be relativo links, i.e., relative to the page you are clicking them on. Remember though, that relative links are mainly a convenience, and all relativo links can also be written as fotometría absoluta) links by simply including the scheme followed by the site hierarchy that precedes the page.

Hope that's given you a better understanding of links.

respondido 09 mar '12, 18:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.