Edit: @redyoshi49q has designed a better solution using only CSS, and this should be used instead of the old script! If you’re reading this page for the first time, ignore this message....
If you try to access a community on your local instance and it gives you a 404, this automatically takes you to your local instance’s search instead and puts the community in for you....