> Hi!
>
> Sorry for the offtopic post, but I thought somebody here just has to know
> the answer to my problem...
>
> I want to rewrite URIs (using Apache 1.31) from something like this
>
>   http://somehost/somedir/123.html
>
> to
>
>   http://somehost/somedir/view?id=123
>
> I tried:
>
> RewriteRule ^/(.*)/(.*).html$    /$1/view?id=$2
>
> which nearly works, as it says in the logs that:
>   rewrite /stepsdok/28.html -> /stepsdok/view?id=28
>
> But mod_rewrite than prepends DocumentRoot
>
> If I set RewriteBase to / the Rule doesn't match anymore, even if I alter
> the Rule:
>   RewriteBase /
>   RewriteRule ^(.*)/(.*).html$    /$1/view?id=$2
>
>
> Does anybody know who to get this working? Or where I can find more info
> (besides http://httpd.apache.org/docs/mod/mod_rewrite.html)


this rule works fine for me
RewriteRule  ^shop/(.
+)$         /cgi-bin/content.pl?path=$1&query=%{QUERY_STRING}       [L]



-- 
Vad

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to