lighttpd forum lighty > Problem mit Mod Rewrite

Posted by Whtr (Guest)
on 04.09.2008 16:04
Hello Guys,
hope you can help me :)

I'm using a new Wordpress Plugin that requires htaccess.
I tried to convert it to the lighttpd style but it didn't work :(

These 2 lines are my problem:

RewriteCond %{REQUEST_URI} /link\/(.*).html$
RewriteRule ^link\/(.*).html$ /out.php?keyword=$1 [QSA,L]

Thank you very much!

Greets
Posted by Ib Board
on 05.09.2008 12:06
Whtr wrote:
> Hello Guys,
> hope you can help me :)
> 
> I'm using a new Wordpress Plugin that requires htaccess.
> I tried to convert it to the lighttpd style but it didn't work :(
> 
> These 2 lines are my problem:
> 
> RewriteCond %{REQUEST_URI} /link\/(.*).html$
> RewriteRule ^link\/(.*).html$ /out.php?keyword=$1 [QSA,L]
> 
> Thank you very much!
> 
> Greets

Given that the RewriteRule section matches the start of the string, I 
can't see the point of the Rewrite Cond in that.

This is just from memory, but have you tried:

url.rewrite( "^/link/(.*)\.html(\?(.*))?$" => "/out.php?keyword=$1&$2" )

Something along those lines should work and is similar to the 
documentation 
(http://trac.lighttpd.net/trac/wiki/Docs%3AModRewrite#passing-matching-the-query-string-get-variables)