Can anyone explain this phrase from the manual doc regarding the type
attribute for the <to> element where I want to use "forwad" ?
"Note: In this case the "to" URL must be in the same context as
UrlRewriteFilter."
In most use cases, users "forward" or "redirect" to a re-written URL. With the former, the original request is "forwarded" using java's request dispatcher which means that the re-writing is hidden from the client. Basically, the URL which was originally requested remains the way it is in browsers' address bar. However, with the latter (type=redirect), the re-written URL is sent back to the browser, which makes an extra request to fetch the resource from a new location.
Moreover, "forwards" have to be in the same application context. You cannot be a
site1.com trying to "forward" to a URL in "
site2.com". Redirects in this case would work though.
Cheers
Avlesh