I’m having a strange behavior on my OpenLiteSpeed Wordpress server.
If for example I’m pointing to https://mywebsite/wp-content/uploads/2019/
I’m seeing the default litespeed 404 error page, but if I’m pointing to a non existent file/folder on my server, I’ll see my wordpress 404 custom error page.
So how can I remove the default litespeed 404 error page so that I can only use my custom one?
I have also removed the /usr/local/lsws/Example/html/error404.html
and deleted my browser’s cache but still no change.
Any help is appreciated. Thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi @komi ,
Getting an OpenLiteSpeed 404 page from https://mywebsite/wp-content/uploads/2019/ is due to there’s no index file exist.
You can fix it by (wiki):
Customized Error Pages
section in the middle of the page. Click Add and choose404 Not Found
as your Error Code and your costumed error page to URL location.There’s another solution which I am not recommended which is by setting
Auto Index
to Yes from Virtual Hosts > wordpress > General > Index FilesNon-exist folder/file return you a correct 404 page is possibly due to hit below example rewrite rules and then rewrite to an index file automatically. In this case, you may hit the back-end PHP and return you the custom/correct 404 page.
FYI, OpenLiteSpeed has a 404 page built-in the code so even deleting the file it will still show.
Best, Eric