Fix Part 1

SERVER_NAME replaceb with HTTP_X_HOST and the dual url format fix
applied