fixed ssl redirection when the site is running from a subdirectory

tested on Apache 2.2 and 2.4 with auto-detect subdirectory and
hard-coded subdirectory in config.php
renamed mr specified variables

These values are not related to AD but only used internally in mr-php.
This should help avoiding any confusion