@baris said in Topics in ignored categories are shown in recent page:
Maybe check this setting at /admin/settings/post 0_1519661867570_97621769-258e-462e-a985-ebaaed5d7672-image.png
thank you, it works 🙂
I'm using Categories as my home page route so have no need for the example.com/categories page. I thought hey, why not have Nginx return a 404 page when users try to visit /categories
:
location /categories {
return 404;
}
But my bright idea isn't quite working because I get the standard ugly Nginx 404 template:
Does anyone know how I can get the Nodebb 404 template to show instead? For example:
@Kowlin thanks but I don't really want a custom Nginx 404 page. I'd prefer the NodeBB 404 template (2nd screenshot) to be used.
@henrywright I'll see if I can somewhat fake it with bootstrap & css
You may try redirecting to the /404
route. It might not look like exactly what you want:
location /categories {
return 301 $scheme://your.site/404;
}
It will give you something like this
If you want it to say /categories not found, you could try redirecting to /categoríes
(replacing i
with í
, i-acute)
@pitaj neat idea! I'll try that. But I'm also thinking there must be a way of intercepting the request before NodeBB serves the page. Then forcing a NodeBB style 404 (i.e. no redirecting)?
@henrywright I think you'd have to do so within NodeBB itself. Also, I don't suggest disabling any routes NodeBB may use, as they are hardcoded and 404ing them could mess stuff up.
@baris I'm going to give that a shot!
@pitaj I did some testing today with /categories 404'd. Seems as though things continued to work fine. I'm not disabling the functionality, just access to the page.