Nginx rewite novice help

http://www.example.com/tag.php?q=test

to

http://www.example.com/t/test

thanks

note i am begin

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,229592,229592#msg-229592