$request_filename will change when you rewrite the request, even if you just do an internal rewrite.
$request_filename is defined as root or alias directive + current URI.
So if you have a root defined as /var/www/testsite and you redirect to index.php then you'll get /var/www/testsiteindex.php
URIs in Nginx always start with a / so it's generally a good idea to rewrite to /index.php instead of index.php