How to get original URL?

36 views
Skip to first unread message

Johnson

unread,
Jan 31, 2011, 5:46:13 AM1/31/11
to UrlRewrite
We are trying to retrieve the original URL at the destination page.
Having looked at the document and search over the web, we cannot find
a solution yet.

Could you please spare a little bit of time and teach us how
to achieve it?

Customer Type:
http://domain/A/B/
it loads the JSP page at
/helloworld/hello.jsp

We want to retrieve /A/B at the hello.jsp

Thanks in advance

Regards,
Johnson

Avlesh Singh

unread,
Feb 1, 2011, 10:17:19 PM2/1/11
to urlre...@googlegroups.com
<rule>
    <from>^(.*)\?(.*)$</from>
    <to last="true">...</to>
    <set name="originalRequestUri">$1</set>
    <set name="originalQueryString">$2</set>
</rule>

And in your code, you might retrieve this using - request.getAttribute("originalRequestUri");
More on <set> here - http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/index.html#set

Cheers
Avlesh
@avlesh | http://webklipper.com


--
You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To post to this group, send email to urlre...@googlegroups.com.
To unsubscribe from this group, send email to urlrewrite+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en.


Reply all
Reply to author
Forward
0 new messages