Changed a rewrite rule in the nginx config as per the nginx documentation. 

Updated the rewrite rule to use a return statement instead as per the taxing rewrites section of the nginx wiki:
http://wiki.nginx.org/Pitfalls#Taxing_Rewrites