Move to php for non-ssl in order to use hostname
Use hostname in non-ssl links