homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
File locations don't match physical location
File locations don't match reality
mrsnade




msg:3809087
 11:40 pm on Dec 16, 2008 (gmt 0)

Hi,

Sorry if this is real lame.

I have a site with the following structure (kinda)

www.MyDomain.com
www.MyDomain.com/index.php
www.MyDomain.com/contact.php
www.MyDomain.com/sitemap.php
www.MyDomain.com/products
www.MyDomain.com/products/index.php
www.MyDomain.com/products/product1.php
www.MyDomain.com/products/product2.php
www.MyDomain.com/products/product3.php

When I run coffeecup or any other sitemap generator they ALL report errors and report the following structure:

www.MyDomain.com/index.php
www.MyDomain.com/contact.php
www.MyDomain.com/sitemap.php
www.MyDomain.com/products
www.MyDomain.com/products/index.php
www.MyDomain.com/products/product1.php
www.MyDomain.com/products/product2.php
www.MyDomain.com/products/product3.php
www.MyDomain.com/product1.php
www.MyDomain.com/product2.php
www.MyDomain.com/product3.php

Notice the last three files.

Should I ignore it? If not, how the heck do I fix that!

I'm worried Google will put me in the sin bin for being a poor quality site.

Anyone?

 

mrsnade




msg:3809100
 11:57 pm on Dec 16, 2008 (gmt 0)

Just in case you're wondering, my links in the page do not refer to the whole url.

This is what I have on the products/index.php page

<a href="product1.php">product1</a>
<a href="product2.php">product2</a>
<a href="product3.php">product3</a>

Should I be using
<a href="http://www.MyDomain.com/products/product3.php">product3</a>
Everywhere?

jdMorgan




msg:3809117
 12:18 am on Dec 17, 2008 (gmt 0)

Don't confuse URLs with filepaths, as the two are not the same thing. In fact, the primary job of a server is to translate a URL request into a file request that is compatible with the operating system of the machine on which the server runs.

It is possible that there is some code in the server configuration that is mapping the file product1.php onto multiple URLs, and that is why your sitemap generator finds multiple URLs.

The real question is, if you click on one of those "product" links, does it work?

If you have a link on a page, and it refers to another page at the same URL "directory" level, then using href="otherpage.php" is fine. If the other page is in the "directory" above the one that is linking, then you'd use href="../otherpage.php", and if below, then href="/child-directory/otherpage.php".

You can also use server-root-relative links by specifying a leading slash to point to the Web root "directory" and then work down from there: href="/parent/child/child/otherpage.php". Finally, you can also use the canonical URL as you stated in your post.

This is all general info; It will take a much more-detailed description of your server type, server configuration, "shopping cart" and server software, and development environment in order to diagnose this problem.

Jim

mrsnade




msg:3809122
 12:26 am on Dec 17, 2008 (gmt 0)

Thanks Jim.

I just did a test and errors go away when I use the full path, so I'll use it until I get the scoop on the server config
(httpd.ini maybe?)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved