Correcting site url to avoid too many redirect requests on assets