Apache setup for not found page

Discussion in 'Apache' started by JanciB, Jan 1, 2012.

  1. #1
    How to make this?:

    http://www.example.com/abcd/some.html

    document root is:

    /web/example/html/

    if the file /abcd/some.html does not exists, take it from:

    /main/pages/html/abcd/some.html

    how to make this?
     
    JanciB, Jan 1, 2012 IP
  2. amigoserv.com

    amigoserv.com Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Edit httpd.conf and edit <virtual host> of the user to use /main/pages/html/ instead of /web/example/html/

    then service httpd restart
     
    amigoserv.com, Jan 2, 2012 IP
  3. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #3
    Or simply add this to your .htaccess
    
    ErrorDocument 404 /404page.html
    
    Code (markup):
    And customize your 404page.html in a way you like.
     
    pr0t0n, Jan 7, 2012 IP