Troubleshooting: <wcf:url> tag does not generate relative URL with SEO enabled

In an environment with the SEO feature enabled, the tag <wcf:url> does not generate a relative URL even though <UrlTagConfiguration useRelativePath="true" /> is set in the wc-server.xml.

In cases where a site has servlet cache enabled and multiple host names, different shoppers should hit URLs with different host names, for example
  • http://hostname1/ContextRoot/<ProductName>
  • http://hostname2/ContextRoot/<ProductName>
If the page for the first link was cached, the cached page would contain the first hostn ame. When the second shopper hits the same /contextRoot/<ProductName> servlet with the second host name, the cached page is sent as the response. Therefore, the second shopper hits the URL with the first host name, but should hit the URL with the second host name.


The cached page is shared between both hosts.


Add the following cache component id to the cachespec.xml file:
<component id="host" type="header">
With this configuration, the pages are cached separately for each host, and the incorrect cache is not sent when the other host was hit.