adds rewrites to fastcgi locations

in some vhosts i need to have rewrites inside fastcgi locations.

this PR adds rewrite rules to the fastcgi.erb file.

for the specs i had to use regex to get the tests going, i am not sure how to write the test in better format.