URL Encode Location Redirect, Fix strtolower()

The value should be in single quotes to prevent PHP parsing so no need to escape `$` then. Also it should be URL encoded as it contains special chars and spaces. The function `strtolower()` returns a value and does not modify by reference so it needs to be assigned to a variable. Also spelling correction.