links to css and js in html broken if portal url is not a root url
The standard html templates links to css, js and images with urls in /skins//xxx. So, if the portal url looks like http://auth.example.com/portal/, browser will look for css in http://auth.example.com/skins// instead of http://auth.example.com/portal/skins//.
We just have to replace the css|js|image urls with relative ones.