Forum Moderators: Robert Charlton & goodroi
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<base href=http://example.com/path1/path2/doc1234.html />
...
</head>
<body>
....
<a href="/seo_page.html">anchor</a>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head>
<base href=http://example.com/seo_page.html />
The <base href> should be referring to the published URL of the document
Even though there were 10 correctly coded links throughout the site for every 1 that had an incorrect path (based on the <base> tag) that Google saw, Google never reported the correct path/pages.
You should also know this is a Joomla website and all Joomla websites have a <base> tag that is dynamically created for each page and every page. The path and file name in the <base> tag is equal to the current page, which is the proper coding according to W3C.
Ah, so I was incorrect?
If you are using Root Relative links (/images/file.gif), then the use of the Base Element is negated and there is no need for it, correct?
If you are using Relative links (images/file.gif, ./images/file.gif, ../images/file.gif., etc.), then the use of the Base Element comes into play.
So now you have another unique element on each page and that is the full URI of that page which is now the base element for all relative paths. Not Root Relative but Relative.
In general, the base element is more trouble than it's worth, even with "correct" usage it is bad practice. Of course, CMS developers don't always produce the best HTML markup, often the nature of a CMS leads to bloated markup.
the template is in
www.example.com/design/templates/blue-template/
And inside template folder you have the stylesheet for the template which is very common, then without the base element, resources in the CSS will have to use a path based on the script where is loaded from, or a fully qualified path.
www.example.com/design/templates/blue-template/ and you can use background: url(images/arrow.gif) safely with NO base element as the image will be loaded from www.example.com/design/templates/blue-template/images/arrow.gif. So the template can be in www.example.com/design/templates/blue-template/ and you can use background: url(images/arrow.gif) safely with NO base element as the image will be loaded from www.example.com/design/templates/blue-template/images/arrow.gif.
<base href="http://www.example.com/test-site/">
<link rel="stylesheet" type="text/css" href="includes/template/stylesheet.css" />
http://www.example.com/test-site/constructs/
But what it does not do is clean up <option value="SEO_page.html"> links