I want my RewriteRule to not take effect if there is an actual file matching the surfer's request within the file system. So if someone goes to mysite.com/realfile.php?foo=bar, and realfile.php is a real file, the surfer gets served realfile.php?foo=bar. But if someone goes to mysite.com/nonexistentfile.php and nonexistentfile.php is not a real file, then the RewriteRule should interpret and pass the request to process.php
I have the following in my .htaccess:
RewriteEngine on RewriteRule (.*)\.php$ process.php?id=$1 [QSA]
This works IF there is no real file in the file system matching the surfer's request. It does not work if the surfer enters realfile.php?foo=bar...in that case they hit the RewriteRule. It does work if they just do realfile.php, but I want query strings still get passed to the real file if it exists. I thought the local file system always took precedence over RewriteRule?