I use this rewrite rule to create SEO friendly urls
rewrite ^/search/(.*).html /search.php?q=$1 last;
I have similar rewrites too; I wonder if it is possible to write a general rule to do so for all php files?
I mean rewrites filename.php?q=something to /filename/something.html
instead of writing a rewrite rule for each php file