Get the URL of the browser

1 view
Skip to first unread message

lusitano

unread,
Dec 4, 2009, 3:44:05 AM12/4/09
to UrlRewrite
Hello,

I'd like to get the URL before processing UrlRewrite. Can someone help
me?

Thanks

Wim De Smet

unread,
Dec 4, 2009, 4:02:57 AM12/4/09
to urlre...@googlegroups.com
Hi,
I'm assuming that in your code, you want to find out what the original
URL was that your client used when hitting the filter. There is,
perhaps, a bog standard way of doing this that I'm not seeing. One
approach that comes to mind, though, is to set it as an attribute of
the URL.

So you have a rule, way on top of your urlrewrite.xml where you call:
<rule>
<from>.*</from>
<set name="local.test.originalurl">%{request-url}</set>
</rule>

Then in your code, if you can get a request object:
String originalUrl = (String)request.getAttribute("local.test.originalurl");

Something like that, anyway. This would require some tweaking. I'm not
even sure if the rule is legal as is.

regards,
Wim

Helder de Azevedo

unread,
Dec 4, 2009, 10:27:37 AM12/4/09
to urlre...@googlegroups.com
Hi Wim,
 
Thank you very much!
This method is ok for my problem!
 
Best regards !
 


 
2009/12/4 Wim De Smet <kro...@gmail.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