Old site migration and keeping links (as aliases)
There's no real need to escape the URI string.

Here's one way to handle this:


In a custom module, implement hook_menu(), creating an item for the path 'faculty.php'
In your php function callback for the above path, look at the PID value, look up the new path (you do have a database table mapping old content to new content, right? :) ), and do a 301 redirect.


Another approach is to do this lookup on all 404 pages with something like the following code in a hook_init():

function hook_init() {
  if (!menu_get_item($_GET['q'])) {
    $pid = isset($_GET['PID']) ? $_GET['PID'] : FALSE;

    if ($pid) {
      // lookup new path and 301 to it
    }
  }
}