If you install fast_404.module and enable path checking you will find that requests for ads may 404.

This is because serve.php uses the 'q' parameter to set the quantity of ads returned. During the Drupal bootstrap that serve.php initiates, fast_404 will do a path check and assumes that because the 'q' parameter is set that its a Drupal request. And since serve.php does not exist as a path alias or a menu item in the Drupal database, it 404s.

The easiest way I could see to get around this was to alter serve.php and define a the constant that fast_404 looks for to skip path checking.

CommentFileSizeAuthor
ad_serve_no_fast_404.patch584 bytesmr.j
Support from Acquia helps fund testing for Drupal Acquia logo