• htacces & 404 files

    From Ivan Shmakov@21:1/5 to All on Sun Nov 13 04:24:38 2016
    XPost: alt.apache.configuration, alt.html

    thedarkman <odemgoldenslippers@googlemail.com> writes:

    [Cross-posting to news:comp.infosystems.www.servers.unix and
    news:alt.apache.configuration and setting Followup-To: there.
    Frankly, I'm a little lost on why this got posted to
    news:alt.html in the first place?]

    Hi, still having big trouble with the 404 file. I've studied half a
    dozen sites that explain how to sort this to no avail. My .htaccess
    file contains:

    RemoveHandler .html .htm

    ErrorDocument 404 404.html

    When someone mistypes a url I want that person to be sent to the
    custom 404.html file but all I get is

    404.html

    Per [1], I'd assume that it's the intended behavior; the second
    argument has to begin with a '/' to force an internal redirect.
    (Alternatively, it can be the message itself, as it is in this
    case, or can begin with, say, "http://" to force a redirect to
    an external document.)

    [1] http://httpd.apache.org/docs/2.4/mod/core.html#errordocument

    Can someone tell me what I am doing wrong, ie the exact coding to put
    in the .htaccess file?

    It can't be more than a couple of lines, surely.

    ErrorDocument 404 /where/is/404.html

    The document location is the local URI "path"; thus, the above
    will show the message from http://example.com/where/is/404.html,
    where http://example.com/ is the server's own URI.

    --
    FSF associate member #7257 58F8 0F47 53F5 2EB2 F6A5 8916 3013 B6A0 230E 334A

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)