Custom page 404 with Directadmin


I use DirectAdmin and I would like to customize my 404 page so I put this in my htaccess, but it doesn't work :

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ error.php?/$1 [L,R=301]
In the OpenLiteSpeed panel

Enable Rewrite Yes
Auto Load from .htaccess Yes

Thank you for your reply

To customize error page for OLS on DirectAdmin, you can locate that OLS virtaul host configuration file, vi it and add:
errorpage 404 {
  url                     /404.html
Of cause, you will need to create 404.html under docroot.

Please check this KB for details.