fixing redirect to work with virtual hosts