Changed regex to strip out /. before query only

The regex suppesed to strip out the /. before query strip it out anywhere in the url.