Apache rewrite to Lighttpd rewrite
Added by vdyy over 15 years ago
Hi i am migrating from apache to lighttpd.
But I am having a problem to apply apache QSA rewrite flag to lighttpd rewrite.
Here is my rewrite rule from my apache2 configuration :
RewriteEngine On RewriteRule ^/test/?(.*)$ /example/index.php?file=$1 [QSA]
And I have tried the following rewrite on my lighttpd configuration file as stated in this page [[http://redmine.lighttpd.net/wiki/1/MigratingFromApache]] to substitute QSA flags:
server.modules = ("mod_rewrite") url.rewrite-once = ( "^/test/?(.*)(?:\?(.*))?$" => "/example/index.php?file=$1&$2" )
There is no error while restarting the lighttpd but when i was going to the url it did not work.
In which part did I make a mistake?
Thx
Replies (2)
RE: Apache rewrite to Lighttpd rewrite - Added by Dimitri over 15 years ago
It's too bad nobody seems to be willing to help on this kind of issue.
This is typically the kind of problem that will prevent people from switching from apache to lighttpd. `
There's an obivious need for more documentation with a variety of examples for people who are not able to spend days learning how to interpret regex from one style to another.
When will we have a module that just takes apache's rewrite rules as-is for lighttpd??
RE: Apache rewrite to Lighttpd rewrite - Added by nitrox over 15 years ago
Never. You´ll need to know basic regex anyway, either with lighty or apache. Search wiki for "debugvariables", that should be helpfull to see how lighty rewrites your requests.