|
hi all,
i'm looking for information on url redirection and
it's effects on tomcat:
i'm using Apache 1.3.20 / PHP 4.0.5 / Tomcat 3.2.1
on WinMe
what i want to do is to split an url like http://www.myhost.com/product/XXX/yyyy.jsp
be split up into http://www.myhost.com/product/yyyy.jsp;
XXXX being transmitted as an argument.
The rewrite rules i've used in apache are as
follows:
RewriteEngine on
RewriteRule ^/product/([^/]+)/(.*)
/product/$2?param1=$1 [QSA]
RewriteRule ^(.+) - [PT] Alias /product
"c:/Apache/tomcat/webapps/product"
In Tomcat's server.xml i've added:
<Context path="/product"
docBase="webapps/product" crossContext="false" debug="0" reloadable="true" > </Context> When i try to call the page http://www.myhost.com/product/XXX/yyyy.jsp
Tomcat says there is an error: can't find page /product/XXX/yyyy.jsp ( seems
doesn't Apache doesn't request the correct/rewirten page name or Tomcat doesn't
correctly understand the request... :( ; i've tried to call the page
/product/yyyy.jsp without the rewriting rules which works fine; i've also used
PHP pages with the rewriting rule which worked. Only have problems with servlets
and jsp pages.
If you have any ideas... Are there any replacements
for SimpleMapper1???
thxs in adavance for your help
Regards
Carlos Ferreira
ps sorry for the bad english :(
|
