You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2009/02/11 23:07:04 UTC
Re: [OT] trouble with url rewrite
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Carol,
On 2/11/2009 12:23 PM, Carol Cheung wrote:
> I'm trying to user UrlRewrite for the following task:
Note that this is technically off-topic. UrlRewrite is often recommended
by users of this list, but nor supported by them. That's what the author
is for.
> If the user types http://localhost.whatever.com:8080/first/
> I want the url redirected to
> http://localhost.whatever.com:8080/second/here/user/index.jsp,
> but the url that the user sees is still
> http://localhost.whatever.com:8080/first/
Sounds like you aren't redirecting.
> <urlrewrite>
> <rule>
> <from>/first/$</from>
> <to>/second/here/user/index.jsp</to>
> </rule>
> </urlrewrite>
http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/index.html
Maybe <to type="redirect">?
> When I go to http://localhost.whatever.com:8080/first/, I get a 404 error.
I suspect the page you're sending your users to have some sort of
problem. Once you have redirection working, you'll have to figure out
why your other page doesn't work.
If /first is the context path of your web app, then forwarding to
/second isn't going to work unless cross-context is enabled for your
context. What is your application's context path? Is /second in another
context? If so, perhaps the redirect will fix everything.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmTTAgACgkQ9CaO5/Lv0PA9rgCfQnwfBacC4D6NpmPeS/lF4Jl9
ZrsAnRAOw47P4GYexy/rbZxx1Ma7p9cg
=DyEl
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org