Page 1 of 1

header.txt Tip

Posted: Wed Jan 10, 2007 9:04 am
by Duns Man
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: header.txt, header, absolute url, relative url, absolute v relative urls

Write your message below:

This is a tip for anyone using the header.txt file in the Mboard or Guestbook.

To incorporate the header.txt file into your Web site's design and have it working properly and if you are wanting to include a navigational menu as part of your header.txt file, you must use absolute urls and not relative urls. This is because your messages reside in a different folder (msg folder).

For example; Absolute url's are:
<a href="http://www.anydomain.com/contact/mail_u ... Contact</a>
<a href="http://www.anydomain.com/mboard/mboard.php">Message Board</a>

Whereas; Relative url's are something like:

<a href="../contact/mail_us.php>Contact</a>
<a href="mboard/mboard.php>Message Board</a>

Therefore when someone comes to view your messages and then try to click on your relative 'Contact' url they will receive a 404 Error.

This is because they are now viewing your msg folder, for example:

http://www.anydomain/mboard/msg/1.html

and therefore your 'Contact' url then becomes:

http://www.anydomain/mboard/contact/mail_us.php

Instead of the true url, which should be:

http://www.anydomain/contact/mail_us.php

I hope this little tip will be of use to you.

Klemen, if you don't feel this tip has been posted in the correct category or, not worthy of a place in this forum, or indeed, badly written, then remove it by all means.

Posted: Wed Jan 10, 2007 9:14 am
by Klemen
Hi,

Yes, full URLs must be used in the header/footer files. As this is useful for LinkMan as well I won't be moving the post.

Regards,