PDA

View Full Version : XHTML 1.1 & in URLs


WebSavvy
10-11-2006, 12:54/12:54PM
Hey guys, I've been looking for an answer to something, and haven't had much luck finding anything.

When using XHTML 1.1 URLs that contain & in the string must be replaced using its HTML name entity (e.g., & amp; -- added space so software doesn't parse it)

The problem is ... the server output URL is different than the linked to URL.

In the page using a URL hyperlink as:

http://something.com/page.php?file=55&section=2

The output (in browser path) is:

http://something.com/page.php?file=55&section=2

The amp; is stripped off of the HTML output because it's getting parsed like HTML markup.

Now, this is the question ... as the URL is hyperlinked in document one way, and the server output is another way -- will Google (and other SEs) see this as 2 different URLs with the same content (e.g., duplicate content filter)?

Someone I know is starting a news website and will be using XHTML 1.1 / PHP / and valid code.

They asked me about this, and I haven't the foggiest idea.

SEFL
10-11-2006, 13:07/01:07PM
Big G counts them as the same URL, since & is an HTML special character entity for &. It appears to convert & to & rather than use the character entity, which I find a bit odd...but nevertheless, it does that.

http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLF,GGLF:2006-19,GGLF:en&q=site%3awww%2egreenbuildingfest%2ecom

The details pages for the 2006 agenda came from

http://www.greenbuildingfest.com/2006-agenda.asp

As you can see, they use the & entity.

WebSavvy
10-11-2006, 13:12/01:12PM
Hey, thanks for that, Adam! :)

SEFL
10-11-2006, 14:02/02:02PM
Not a problem. That's what code warriors who know a little SEO are for. ;)