From: Luke O. <lu...@me...> - 2003-04-03 20:20:48
|
> I'd keep trying on the rewrite -- obviously this is a URL > backward-compatibility hack, and mod_rewrite is good for > that. What > were you trying for your RewriteRule? I was about to send this out, so I'll agree with Ian. Are you using mod_rewrite to map your servlets as well (ie, is that taking preference over this backwards compatibility rule?) To expand, I would expect the rewrite rule to look something like: (Note: Querystring parsing is very mucky in mod_rewrite, so I would suggest if it is possible for your new servlet to accept the same get-variables? ie, in the servlet accept 'pmid' as an alternative to 'id'. If yes, then:) RewriteRule ^/public/page\.html ^/public/de/otherpage [L,PT] (If not, then perhaps.....) RewriteCond %{QUERY_STRING} pmid=([^&]*) RewriteRule ^/public/page\.html ^/public/de/otherpage?id=%1 [L,PT,QSA] (Since %1 let's you refer to backreferences in the previous RewriteCond, and RewriteCond let's you access the QueryString. QSA flag forces it to let you modify the QueryString in the RewriteRule and append instead of overwrite.) - Luke |