I'm trying to create a short URL for a GAE app, so I used UrlRewriteFilter, but I can't get it set up correctly. Basically, the user is given this:
- test.com/012a-bc
and the page that they should be redirected to is
- test.com/vote.jsp?id=012a-bc
At the moment it's working with the urlrewrite.xml
file like this:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN" "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>
<rule>
<from>/([0-z]+)</from>
<to last="true">/vote.jsp?id=$1</to>
</rule>
</urlrewrite>
The problem is that all URLs now redirect to this, so for example
- test.com/thankyou.jsp?id=0123
still runs the page at vote.jsp. What should I do to get it to redirect only when the URL isn't found?