Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

custom 404 page

Options
  • 04-07-2013 12:55pm
    #1
    Registered Users Posts: 553 ✭✭✭


    Guys quick question regarding setting up a custom 404 page.

    I set up a htaccess file with the following code :
    ErrorDocument 404 /404.html
    

    I have both the 404.html and the htaccess file in the root directory. Now heres my problem, the 404 only works in one of the sub-directories, it doesn't work from the root directory.

    example

    http://urbangames.ie/foobar

    http://urbangames.ie/html/foobar

    Can anyone suggest a fix for this.

    Thanks for your help


Comments

  • Registered Users Posts: 1,880 ✭✭✭IRE60


    redman85

    Works in only one sub-directory or all and not the root?

    C


  • Registered Users Posts: 1,880 ✭✭✭IRE60


    sorry - only spotted you URL now.

    Its a strange one - one thing i might suggest woul be to make a folder (say error) stick the 404 in there and update the htaccess to that

    ErrorDocument 404 /error/404.html

    Its a bit of a shot in the dark, but it's worth a shot

    AND: stick your analytics code in your 404 - very helpful when reviewing the site.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    I'm not hugely familiar with Apache, but the most obvious thing is that there's another rule somewhere that supersedes your new htaccess rule for the root directory only, possibly another entry in the htaccess or another config entry somewhere else (httpd.conf for e.g., or possibly in your URL rewriting).


  • Registered Users Posts: 553 ✭✭✭redman85


    stevenmu wrote: »
    I'm not hugely familiar with Apache, but the most obvious thing is that there's another rule somewhere that supersedes your new htaccess rule for the root directory only, possibly another entry in the htaccess or another config entry somewhere else (httpd.conf for e.g., or possibly in your URL rewriting).


    Thanks guys, got its sorted. there was a .htaccess file in the html directory but it was hidden in the terminal.

    Thanks for the help.


Advertisement