Added a check for the REDIRECT_SCRIPT_URL var which is used in DreamHost among others