Prompt people to join public group instead of giving 404 Page Not Found

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