Lighttpd – url rewrite and query string QSA

One of the first things I was curious about when I started using Lighttpd was url-rewrites. On apache mod_rewrites you can use the [QSA] flag to allow for the query string after your new urls. Here is the equivalent in lighttpd. This would go in your lighttpd.conf file which is usually located in /etc/lighttpd/lighttpd.conf on your server.

The important part is the (?:\?(.*))? pattern which matches (optionally) any query string and forwards it to your php file. If you do not have this code, your new url will return a 404 error for any query strings appended to the new url.

, ,

Powered by WordPress. Designed by Woo Themes