The base URL can contain a tilde which conflicts with the queryless_urls regex, causing preg_replace_callback to return null. Using bracket delimiters would be better.
Switched from bracket delimiters to exceping the tilde in preg_quote
Merge pull request #1875 from AlexanderOMara/seo_urls_tilde_path_fix

Search engine friendly URLs whitescreens the site if there is a tilde in the path.