Web Hosting Forums

Results 1 to 11 of 11

This is a discussion on 404 Page in the Hosting Talk & Chit-chat forum
Can someone help me!? I made a .htaccess file and put ErrorDocument 404 /errors/404.shtml I uploaded this to my site, in the /www/ directory. I ...

  1. #1
    Loyal Client
    Join Date
    Mar 2002
    Posts
    11

    404 Page

    Can someone help me!?
    I made a .htaccess file and put
    ErrorDocument 404 /errors/404.shtml
    I uploaded this to my site, in the /www/ directory.
    I tried testing this out but the 404 page doesn't appear.
    Am I doing something wrong?
    BTW, when I upload it, it doesn't appear on FTP only though file manager.

  2. #2
    04 LeeUmm's Avatar
    Join Date
    Oct 2002
    Location
    Hamilton, Ontario
    Posts
    630
    Did you upload the 404.shtml page to /errors/ directory?
    Nomsane?
    That is all.

  3. #3
    Loyal Client
    Join Date
    Mar 2002
    Posts
    11
    Well now I got my 404 page working but when it goes to the 404 page it shows the adress for the 404 page. How do I make it show only the adress of the page that doesn't exist?

  4. #4
    Loyal Client
    Join Date
    Sep 2001
    Posts
    98
    Would I be terribly rude if I appended my questions to this topic rather than starting a new one? It's also about error pages.

    I've created the pages 400.shtml, 401.shtml, 403.shtml, 404.shtml and 500.shtml

    Now, assuming I've uploaded these to the public_html folder, the .htaccess file (also in public) it should read:

    ErrorDocument 400 400.shtml
    ErrorDocument 401 401.shtml
    ErrorDocument 403 403.shtml
    ErrorDocument 404 404.shtml
    ErrorDocument 500 500.shtml

    Exactly like that, right?

    If I want to customize even further for subdomains, I just upload the error pages to the subdomain directory and create an .htaccess file the same way for each sub?

    Also, if I have an .htaccess file and custom error pages for the main domain plus the subdomains, will it cause problems or should each refer to the corresponding .htaccess and error pages?

    Thanks for any help ^_^

  5. #5
    Loyal Client
    Join Date
    Jul 2001
    Posts
    579
    Missing some slashes. It should be:


    ErrorDocument 400 /400.shtml
    ErrorDocument 401 /401.shtml
    ErrorDocument 403 /403.shtml
    ErrorDocument 404 /404.shtml
    ErrorDocument 500 /500.shtml


    Otherwise it will give an error 500, I believe.

  6. #6
    Loyal Client
    Join Date
    Sep 2001
    Posts
    98
    I see, thanks Tribby ^_^ . And as long as I have an .htaccess file for each sub it should pull up the error files for that sub?

  7. #7
    Loyal Client jkeller's Avatar
    Join Date
    Feb 2002
    Location
    Paris, France
    Posts
    1,502
    Since subdomains are seen by the httpd as subdirectories of your main public_html directory, it'll show the ErrorDocument(s) definted in the main .htaccess. If you prefer to override those pages, you'll need an .htaccess within the subdomains. This also means, for anyone who really wants to be control freaks, that you can define error pages on a per-directory basis.

  8. #8
    Loyal Client
    Join Date
    Sep 2001
    Posts
    98
    Thanks, that's what I thought. Not that it matters at the moment, since Scorpion decided to take a vacation :weyes:

  9. #9
    Loyal Client
    Join Date
    Mar 2002
    Posts
    11
    I don't know what I did but my error pages work now!

  10. #10
    Loyal Client
    Join Date
    Jan 2002
    Posts
    636
    Sorry... thats just funny!

    My luck never runs that way... sighssss

  11. #11
    Loyal Client
    Join Date
    Oct 2002
    Location
    san jose, ca
    Posts
    56

    the original question?

    To reply to teh question a long time ago:

    what I would to is just:

    <?php

    echo $REQUEST_URI;

    ?>

    to show the requested URL (yes, the variable it is an I)...
    adun

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •