redirect specific URL to html page

49 views
Skip to first unread message

Rob A

unread,
May 10, 2012, 10:45:21 AM5/10/12
to UrlRewrite
Hi,

I'm trying to write a rule that scans the incoming url and if there is
an existence of a string in that URL, then redirect to a specific html
page. I'm using this on tomcat v6 x64 on windows platform.

The incoming url would be something of the form like:

/llisapi.dll?func=brava.bravaview<andmuch more>

If I find brava.bravaview in the url, I want to redirect.

For example:

The following doesn't work:
<rule match-type="wildcard">

<from>/**brava.bravaview**</from>
<to type="redirect">/Livelinksupport/brava.html</to>
</rule>


In fact the only rule I can get to work is:

<rule match-type="wildcard">

<from>/llisapi.dll</from>
<to type="redirect">/Livelinksupport/brava.html</to>
</rule>

which directs everything.

but if I try:
<rule match-type="wildcard">

<from>/llisapi.dll?</from>
<to type="redirect">/Livelinksupport/brava.html</to>
</rule>

(notice the after the .dll - it doesn't work - why does the ? break
it?

Also,

why can't I do something like:
<from>/**brava.brava**</from> - i.e how do I just check if that
particular string exists?

Thanks.
-Rob

Nikos Georgosopoulos

unread,
May 16, 2012, 5:47:35 AM5/16/12
to urlre...@googlegroups.com
Have you tried to use the default regex matching mechanism and write

<rule>

        <from>.*brava\.bravaview.*</
from>
        <to type="redirect">/Livelinksupport/brava.html</to>
    </rule>

Be carefule, the . in between the Brava words must be escaped.
Reply all
Reply to author
Forward
0 new messages