Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
404 error page does not always display properly
Old 09-10-2008, 03:50 AM 404 error page does not always display properly
Average Talker

Posts: 19
Name: Bob Jones
Trades: 0
I'm having an unusual problem with my 404 error page, which doesn't always appear in its proper form.

cPanel saves my 404 page in my root folder as 404.shtml. The thing works fine as long as the visitor mistypes a page name, in the form of mysite.com/wrongpage.php or something similar.

The problem occurs when the address is improperly named in the form of a folder, as in mysite.com/wrongpage/.

What happens then is my 404 page appears, but without the benefit of my style sheet. There appears to be a path problem that manifests itself only in this instance, that prevents the page from finding index.css.

Any idea on how to fix this problem?

Thanks.
slobjones is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-10-2008, 04:56 AM Re: 404 error page does not always display properly
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
not without actually seeing it.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-10-2008, 05:35 AM Re: 404 error page does not always display properly
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
I can guess that you have specified relative path to your css file in your html
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 09-10-2008, 02:01 PM Re: 404 error page does not always display properly
Average Talker

Posts: 19
Name: Bob Jones
Trades: 0
404 page appearing properly when non-existent page is entered in url bar:
http://tinyurl.com/5jtydu

404 page appears but index.css is lost when non-existent folder is entered (with trailing slash):
http://tinyurl.com/5bs597

I tried the full path for index.css, as mtishetsky appeared to suggest, without any better luck.
slobjones is offline
Reply With Quote
View Public Profile
 
Old 09-10-2008, 03:10 PM Re: 404 error page does not always display properly
Average Talker

Posts: 25
Name: Will
Trades: 0
Can you please post your code of your 404 page here, if what you are saying is true then actually your 404 is working 100% correctly, its just the link to the STYLE or CSS page, or some of the links in it may not be full paths and this is why it works in some directories and not in others.

Putting the full paths for all entries should help
ie
http://yourdomain.com/dir/filename
instead of
/dir/filename

Posting the code here would help us though
__________________

Please login or register to view this content. Registration is FREE
- webcs.com

Please login or register to view this content. Registration is FREE

management and hosting since 1996
webcs is offline
Reply With Quote
View Public Profile Visit webcs's homepage!
 
Old 09-10-2008, 03:15 PM Re: 404 error page does not always display properly
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Your stylesheet links are document relative href="stylesheets/etc"

they should to be ROOT relative for rewritten URLs href="/stylesheets/etc"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-10-2008, 04:48 PM Re: 404 error page does not always display properly
Average Talker

Posts: 19
Name: Bob Jones
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Your stylesheet links are document relative href="stylesheets/etc"

they should to be ROOT relative for rewritten URLs href="/stylesheets/etc"
It finally occurred to me that I must adjust the paths in my error pages, not the theme pages in my blog!

Thanks for your help.
slobjones is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to 404 error page does not always display properly
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19578 seconds with 12 queries