I've got address like http://profil.domain.tld/profil,ID,username.html
And rewrite rule like this:
rewrite ^/profil,([0-9]+)(,.*).html$ /profil.html?aId=showuser&uId=$1 last;
Ofc, I've enabled debug log to see what location it use, and it's using ~ \.html$ (which are FastCGI parsed php files).
The problem is, that it is looking for file profil,any_number,username.html in root directory.