Custom 404 page headers

#1
So, I've been trying to figure out how to make OLS push a 404 header with custom error pages with no luck.
httpstatus.io says OLS pushes it as a 302 (which is bad for SEO). Is there any way to make OLS push an actual 404 with a custom 404 page?
 

lsfoo

Moderator
#2
Hi AEDELGOD,

In the web admin, go to Virtual Hosts->Your vhost->General. There is a customized error pages section. Is this what you're looking for?

Cheers,
Kevin
 
#3
No, I have a custom 404 page, it is added correctly. What I noticed is that OLS doesn't handle them correctly. Instead of giving a 404 header for a custom 404 it gives a 302. The default OLS 404 page gives a 404, just not when you have a custom one. I have it as just 404.html. I also tried it as a full url (which is suppose to throw a 302 and does).

example I have my personal domain dillynbarber.com It is one page naturally this pages gives a 200 OK. If you add anything else to the url like dillynbarber.com/derp it shows you the 404.html page but the status goes (302 > 200 OK)
 

lsfoo

Moderator
#6
I do not have time to further test this tonight, but what does your config look like? Is the custom 404 page the only custom error page listed? Or do you have multiple custom pages?

I did a quick test on 1.4.21, and it did not fail, so it may be a recent change.
 
#7
404 is the only custom error page I have. It has done this on 1.4.22 and 1.4.23 you can feel free to check the headers on my site.

Config for it looks like this:

Code:
Error Code         URL
404 Not Found  404.html
 

lsfoo

Moderator
#8
Did you try /404.html instead of 404.html? When I tried 404.html, I got an infinite redirect, which may be what you were experiencing.
 
Top