<to> element : help for "forward" type attribute

8 views
Skip to first unread message

Razvan C.

unread,
Nov 20, 2009, 3:12:13 AM11/20/09
to UrlRewrite
Hello,

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."

Maybe an example please.

I am using it but even if i get the correct generated url in <to> i am
redirected to home page.

Environment: Liferay 5.2.3 on Tomcat 6.0.20.

Any help is appreciated,

Thanks

Avlesh Singh

unread,
Nov 20, 2009, 10:46:38 PM11/20/09
to urlre...@googlegroups.com
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

Razvan C.

unread,
Nov 26, 2009, 2:53:59 AM11/26/09
to UrlRewrite
Hi Avlesh

Thanks for your reply; i figured out

Best regards

Razvan C.
Reply all
Reply to author
Forward
0 new messages