0

I am receiving an

"Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster."

which is pretty obverse to me. problem is when I use on all the page where I need the navigation bar to work on. some of my links ty to go to http://localhost/xenxarragroup/site_03/site_03/gallary/index.php which should really be going to http://localhost/xenxarragroup/site_03/gallary/index.php. I get this problem say when i click from home say my Gallery page then to Design room I get "Object not found!"part which leadsa me back to this http://localhost/xenxarragroup/site_03/site_03/gallary/index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>XarraLures - Home</title>
<link rel="shortcut icon" href="im/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="nav.css" />
</head>

<body>
<!--class="pressed"-->
<div class="container">
  <div class="header" id="top">
   <div class="menuBar" id="menuBar">
        <!--<input type="checkbox" id="css3menu-switcher" class="c3m-switch-input">-->
        <ul id="css3menu1" class="topmenu">
            <li class="topfirst"><a href="../index.php" title="Home" 
 target="_parent" style="height:18px;line-height:18px;">Home</a></li>
            <li class="topmenu"><a href="../site_03/gallary/index.php" title="Show Room" target="_parent" style="height:18px;line-height:18px;">Show 
 Room</a></li>
            <li class="topmenu"><a href="../site_03/Design/index.php" title="Design Room" target="_parent" style="height:18px;line-height:18px;">Design Room</a></li>
            <li class="topmenu"><a href="#" target="_parent" 
 style="height:18px;line-height:18px;">Shop</a></li>
 <li class="topmenu"><a href="#" target="_parent" 
 style="height:18px;line-height:18px;">Enquires</a></li>
            <li class="topmenu"><a href="#" target="_parent" style="height:18px;line-height:18px;">Comments</a></li>
            <li class="toplast"><a href="#" target="_parent" style="height:18px;line-height:18px;">About Us</a></li>
        </ul>s
    </div>
 </DIV>
</div>
 </body>
 </html>

the only thing I tried is to change the allocations of the directory to which it it point to

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • 2
    Use absolute path (from `/`) instead of relative ones (`../`) – Cid Jan 29 '19 at 11:43
  • Use `href="/` instead of `href="../`. (`href="/` will point to the topmost directory) – brombeer Jan 29 '19 at 11:44
  • 1
    @Cid and kerbholz Then what happens when the site moves and the path from the new servers root is different – RiggsFolly Jan 29 '19 at 11:49
  • @RiggsFolly that's indeed boring to edit the path when it's moved, one solution could be to use some kind of settings file that will store the path from `/` to the real root folder of that site. Then in php, re-build that path. I personnaly prefer using a framework with a routing system. – Cid Jan 29 '19 at 11:55
  • 2
    https://stackoverflow.com/questions/11927968/document-root-php – RiggsFolly Jan 29 '19 at 11:59
  • 2
    @RiggsFolly yep, that. or `__DIR__` to get a path relative to that navigation file – Cid Jan 29 '19 at 12:05
  • @RiggsFolly Oh well, in fact no, this won't work. – Cid Jan 29 '19 at 12:20

0 Answers0