How to handle Byte Order Mark (BOM) in the url

The website that I'm managing is pumping out a 500 error whenever someone visits the website with myapp.com/%EF%BB%BF or with BOM path. Is there any way I can redirect this to the root page?

Although this rarely happens, this error is recorded once in a while so would love to take care of it.

Thanks in advance!

edit: The error itself is ActionView::MissingTemplate of {"controller"=>"mycontroller", "action"=>"show", "id"=>""}

Posted Aug 29, 2016, 11:34 PM UTC · edited

55
Loading comments…