Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2004, 08:07 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: Falmouth, UK
Posts: 37
harrythehound RepRank 0
Default custom error messages

Hi, I've got a custom error message on my site:

http://www.min-eng.com/mei404.html

and I have the following line in my htaccess file:

ErrorDocument 404 /mei404.html

and my question is: how do I get this message to work properly in my sub-directories?

If you click on this link you will see that the links are not displaying properly:

http://www.min-eng.com/jobs/22.html

Also, is it possible to have a completely different error message in different sub-directories?

Thanks for any help.

Amanda
__________________
www.min-eng.com
Reply With Quote
  #2 (permalink)  
Old 06-10-2004, 08:56 AM
DOA DOA is offline
WebProWorld Member
 

Join Date: May 2004
Location: UK
Posts: 36
DOA RepRank 0
Default

Hi,

I think your problem is with using relative url's for your page links. I had a smiliar problem a few months ago and replacing these with absolute urls seemed to cure it

Mike
__________________
Change is inevitable....except from vending machines
Reply With Quote
  #3 (permalink)  
Old 06-10-2004, 10:28 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: Falmouth, UK
Posts: 37
harrythehound RepRank 0
Default relative URLs

Hi Mike, do you mean the URL's in the links on my error page, on the htaccess file or on my whole site in general!

Thanks for the help,
Amanda
__________________
www.min-eng.com
Reply With Quote
  #4 (permalink)  
Old 06-10-2004, 05:11 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Referencing links from pages in folders

Hi Amanda,

I don't think the problem you have here is actually a 404 problem at all. The 404 page works on all levels of your site... what doesn't work is the referencing of navigation links.
You could try using a base href tag for your pages.. any page that is deeper than the root would have http://www.yourdomain/foldername/ as its base href... do you get my drift?

How do you currently go about adding new pages? Do you use the same template for the whole site?

Hope to hear from you soon,

Paul
Reply With Quote
  #5 (permalink)  
Old 06-11-2004, 05:06 AM
DOA DOA is offline
WebProWorld Member
 

Join Date: May 2004
Location: UK
Posts: 36
DOA RepRank 0
Default

Yeah should've explained myself a bit better, as paulhiles says the problem is when your custom 404 page loads it can't find the images etc needed to load the page correctly when it gets deeper into the site. The solution I used was to put in the absolute url to all images etc eg http://www.yoursite.com/images/image1.gif instead of images/image1.gif. There may be a better solution, this just works for me

Mike
__________________
Change is inevitable....except from vending machines
Reply With Quote
  #6 (permalink)  
Old 06-11-2004, 10:32 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: Falmouth, UK
Posts: 37
harrythehound RepRank 0
Default

Great!

Thanks guys, that's sorted out the problem just fine.
__________________
www.min-eng.com
Reply With Quote
  #7 (permalink)  
Old 06-11-2004, 10:37 AM
WebProWorld Member
 

Join Date: Aug 2003
Location: Falmouth, UK
Posts: 37
harrythehound RepRank 0
Default

Sorry Paul, I forgot to answer your question about templates.

In each sub-directory I use the last page to be added, eg www.min-eng.com/biotechnology/24.html, as a template for the next page, ie www.min-eng.com/biotechnology/25.html. Then I just change the information between my and comments.

Amanda
__________________
www.min-eng.com
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0