bugfix: wrong handling of REDIRECT_URL

The REDIRECT_URL server var was set incorrectly. There also was a kind of bad handling of the REDIRECT_QUERY_STRING var as well.