Prevent urls with ?parameter=value to get slashed

Adds a check that checks for question marks in the URL to prevent an additional slash to being added sometimes breaking the website.

Example URL that this would occur on before this fix: https://www.google.se/?parameter=value