引导用户加入公共群组,而不是显示“404 页面未找到”

This functionality is built in and can be enabled by checking Admin - Settings - Security - detailed 404.

See Different error pages for 404 (not found) and 401 (private) - #4 by xav