Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

How Do You Disable Vanilla's HTTP Error Pages?

I'm trying to set up a vanilla install, and I'm needing to integrate Vanilla with the website that already exists which has its own error pages. They're set in apache to send HTTP errors to specific locations, but in Vanilla that isn't working. I can even set ErrorDocument in the .htaccess file and nothing works. Is there any way to disable its internal handling of HTTP errors?

Comments

  • Hi,
    Did you find a way to disable them?
    I've found your thread via Google when looking for options to disable them or at least to configure the Default404 field on /dashboard/routes to redirect all 404 errors to another URL.
    The ErrorDocument directive I had set for 404 errors via .htacess is not working!

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @AristaP said:
    Hi,
    Did you find a way to disable them?
    I've found your thread via Google when looking for options to disable them or at least to configure the Default404 field on /dashboard/routes to redirect all 404 errors to another URL.
    The ErrorDocument directive I had set for 404 errors via .htacess is not working!

    Are you aware this thread is ancient ? Wtf? Are you unable to start a new discussion ?

  • Thread might be ancient but topic is the most relevant I found.
    About your "Wtf": Please spare my life. Thanks for your mercy.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @AristaP said:
    Thread might be ancient but topic is the most relevant I found.
    About your "Wtf": Please spare my life. Thanks for your mercy.

    Your question is not relevant to this discussion because that was 4 years ago and vanilla software has changed since then. The old versions are no longer supported as the red banner at the top says. Get with the program.. please

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @AristaP said:
    Thread might be ancient but topic is the most relevant I found.

    Great that you have searched, that is more than most of the other users do ;)

    Here it is considered to be bad practice to post to old discussions. Creating a new one and maybe linking the old one would be a better way, because then it would have been in the correct category.

    But anyway, here is the solution: you would need a plugin or if you already have a custom theme, just insert this code into your themehooks file:

        public function gdn_dispatcher_notFound_handler($sender, $args) {
            $args['Handled'] = true;
            header("HTTP/1.0 404 Not Found");
            // Or if you prefer to do the redirect in the plugin:
            // header('Location: http://your.error.page.com/');
        }
    


    CaylusAristaP
Sign In or Register to comment.