View Single Post

  #9 (permalink)  
Old 02-16-2007
shimmyshack
 
Posts: n/a
Default Re: mod_rewrite & headers

On 16 Feb, 14:02, "Dave" <spambox.dcc...@gmail.com> wrote:
> Yes, that's pretty much how I've done this in .NET
> I couldn't find much athttp://www.ampache.com, sorry.
>
> Just one other question...
>
> I'm trying to resolve this rule:
>
> RewriteRule ^test.html?s=([0-9]+)&b=([0-9]+) /folder$1/$2/test.html
>
> where you would supply test.html?s=2&b=14016, which would rewrite the
> url to: /folder2/14016/test.html
>
> However, I can't get it to work using the above rule. Can anyone help
> please?
>
> Thanks
>
> Dave


sorry my mistake: http://www.ampache.org

it seems strange to me that you are rewriting things this way when you
could just later the links.
However you can use
ReWriteCond %{QUERY_STRING} s=([0-9]+)&b=([0-9]+)
RewriteRule . /folder%1/%2/test.html [L,NS]
where the syntax %1 rather than $1 is because it matches against the
last conditions.