Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 404 error URL not matching href URL

  1. #1
    donsno278 is offline x10Hosting Member donsno278 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    12

    404 error URL not matching href URL

    All but one of my internal links are working fine, but one is throwing a 404 error and the URL it says was not found is not the URL I'm trying to link to. I have changed both the href URL and the name of the target index.file several times but the 404 always reflects a different URL than I'm trying to link to. I can't find any other instances of the html file I'm trying to link from. It charts like this:

    404 "alpha.html is not found" This is consistent and wrong
    calling file "<a href="beta.html> etc. or
    calling file "<a href="gamma/beta.html> etc depending if the target is in a subfolder or not

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: 404 error URL not matching href URL

    Sounds like an .htaccess mod_rewrite problem.

    Without a link to the page in question, it is hard to tell.
    Nothing is always absolutely so.

  3. #3
    donsno278 is offline x10Hosting Member donsno278 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    12

    Re: 404 error URL not matching href URL

    Quote Originally Posted by descalzo View Post
    Sounds like an .htaccess mod_rewrite problem.

    Without a link to the page in question, it is hard to tell.
    The domain is donsfamily.x10.mx; /public_html/trees/ is the link to the problem area. I hope this is what you need.
    I should have added earlier that this link was working error free until I updated the target index.file a couple of days ago.
    Last edited by donsno278; 03-20-2011 at 11:56 PM.

  4. #4
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: 404 error URL not matching href URL

    Can I have the exact steps to reproduce the error? I don't see any 'index.file' under /trees/.
    Thanks,
    Brandon Long

  5. #5
    donsno278 is offline x10Hosting Member donsno278 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    12

    Re: 404 error URL not matching href URL

    Thanks for the comeback, Brandon. I've reset the coding to simplify--I had left it as it was when I quit trying different alternatives.
    From public_html: /trees/trees.html; near the bottom of that page is "<a href="folder_one/index.html" which should open a family tree display. Ignore the second line there; I'll fix that when I find out how. ;-)

    For me, that top line throws up a 404 "Not Found
    The requested URL /folder_one/index.html was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request". Even if I change the folder and index file names for testing, the 404 message never changes to match the different names.

    I hope that's enough of a clue that you can point me to the problem and a solution.
    Last edited by donsno278; 03-21-2011 at 03:48 PM.

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: 404 error URL not matching href URL

    1. that link points to 'index page.html' ... with a space, which is bad. URLs should not have spaces in them.
    2. that link works
    3. the name of the index page should be index.html . If you go to /trees/folder_one you see a list of all your files, which is not standard practice.
    Nothing is always absolutely so.

  7. #7
    Anna's Avatar
    Anna is online now I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: 404 error URL not matching href URL

    in folder_one/ there is no index.html, there is however one "index page.html" if you rename that file to index.html (assuming that one holds the content you are after) it should work.

    folders/files need to be referenced with their exact name, even case matters here, and generally you should not have spaces in your files/folders name when dealing with internet.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  8. #8
    donsno278 is offline x10Hosting Member donsno278 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    12

    Re: 404 error URL not matching href URL

    Descalzo, Anna - thanks for the quick responses. The program that compiled the target web page named it with a space, but I tried several other names with no space, and never got it to work. I have just renamed the target file "index.html", gone to the website in both Opera 11 and MSIE 8, and neither one will open that link. All the "404" messages are driving me crazy! :-) That same file with the original name "index page.html" opens fine on my own machine, but not on my web page. There's got to be a trick to it somewhere. :-)

  9. #9
    Anna's Avatar
    Anna is online now I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: 404 error URL not matching href URL

    Try clearing your browser cache, I had to do that before the link on trees.html actually became the right one, when I loaded up the page it did show as linking to "index page.html", after clearing my browser cache (or rather doing a forced reload by hitting ctrl+f5) it showed the correct link, and clicking it worked fine.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  10. #10
    donsno278 is offline x10Hosting Member donsno278 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    12

    Re: 404 error URL not matching href URL

    Thanks, Anna. Nope, not even that works. How are you testing the link? I can only get there by logging into my page with its password (which has been working for weeks now), navigating to the right sub-page, and following menus, but every time I get the same result. Insane, right? Would your tests spot a corrupt file? I'm starting to wonder about that, since the problem only started when I updated that target index.file a few days ago, but the new file still works fine on my own system. Weird!
    Last edited by donsno278; 03-21-2011 at 06:39 PM.

Closed Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 11-30-2010, 04:23 PM
  2. Replies: 1
    Last Post: 08-20-2010, 03:26 AM
  3. Replies: 1
    Last Post: 01-23-2009, 02:57 PM
  4. Site IP not matching server IP
    By jasontan6 in forum Free Hosting
    Replies: 6
    Last Post: 03-23-2008, 04:51 PM
  5. [REQ]Sig and Matching Avatar
    By MicrotechXP in forum The Marketplace
    Replies: 37
    Last Post: 03-29-2006, 05:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers