a href broken - need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
randallcovert
Forum Newbie
Posts: 2
Joined: Mon Aug 25, 2003 12:51 pm
Location: Scottsdale Arizona

a href broken - need help

Post by randallcovert »

When I try to use a link such as;

<a href="default.php">Home Page</a>

it doesn't provice the page. Instead it gives me the following error;

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
Error 404
http://www.operations.followuptools.com
Mon 25 Aug 2003 10:41:53 AM MST
Apache/2.0.40 (Red Hat Linux)

Could you please tell me if I have to turn something on in Apache 2.0.47 or in php?

Thank you in advance for your assistance.

Randy Covert
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

The only thing I can think of is that the page "default.php" doesn't exist.
randallcovert
Forum Newbie
Posts: 2
Joined: Mon Aug 25, 2003 12:51 pm
Location: Scottsdale Arizona

Post by randallcovert »

The file "default.php" exists in the root web directory. I already checked that. Any other suggestions?

Randy
bungle
Forum Newbie
Posts: 3
Joined: Mon Aug 25, 2003 3:57 pm
Location: montana

Post by bungle »

why dont you try adding a "/" then to make sure:

<a href="/default.php">Home Page</a>
User avatar
mcsleazycrisps
Forum Newbie
Posts: 6
Joined: Mon Aug 25, 2003 7:12 am
Location: UK

Post by mcsleazycrisps »

or is the default.php file outside the web root?

often hosts have a "public_html" or "httpdocs" directory on their FTP server where you should put all files you need to access directly from a browser.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

bungle wrote:why dont you try adding a "/" then to make sure:

<a href="/default.php">Home Page</a>
NEVER do
unix starts it's path with / so doing that can screw with the path internal to the server. it's not good to do. if you want it to be in THIS folder you should use ./ if you want it one folder up relative to this one ../
Post Reply