// Servlet/Filter, with no leading '/'.
PrependingStringBuffer prepender = new PrependingStringBuffer(url.toString());
// Prepend prefix to the URL to make it relative to the current
// request.
prepender.prepend(requestCycle.getRequest().getRelativePathPrefixToWicketHandler());
result = prepender.toString();
// We need to special-case links to the home page if we're at the
// same level.
if (result.length() == 0)