skin.conf 404 override

Version 1.52

Feature
Finished

You can now add a new variable, eg: 404_override=user/404.html to the skin.conf file. This setting allows you to control the output of the 404 pages by instead, sending a specific page, with the data set in the desired file (eg: user/404.html, can be changed). This file is tokenized similar to an HTM_ file. Note, the FileManager is chrooted, so if you trigger a 404 for a file that does not exist, you'll still get the old format because the 404_override file is loaded after the chroot has already happened. --------- Also new optional file in the skin document root: routes.conf which will list valid paths that will return 200 instead of 404 for the 404_override file. Intended purpose is for vue-router / JS framework to redirect things like: domain.com:222/app/ftp/create to valid places via JS using the 404_override file. The same file is sent regardless of the routes.conf list, but the list simply controls if it's a http 200 or 404 response code. The routes.conf supports wildcards, similar to the shell (cannot cross / character) So: /app/test/* will mach: /app/test/bob but will not match: /app/test/ftp/bob

Interested to try DirectAdmin? Get a 30-day Free Trial!