$_SERVER["REQUEST_URI"]; not returning anything

I am running nginx and can see request_uri setup in fastcgi_param for the server, but the following code does not return anything for $_SERVER[REQUEST_URI];.

<?php
$old = $_SERVER[REQUEST_URI];
$new = str_replace('_', '-', $old);
$new = substr_replace($new, '/property', 0, 4);

header("Status: 301 Moved Permanently");
header("Location: $new");
?>

Any ideas how to get the variable to work?

Status: 
Closed (fixed)

Comments

Figured it out. I had to put "fastcgi_param REQUEST_URI $request_uri;" in the location, even though it was already specified for the server.