I have to have Web addresses for example mydomain.com/whatever, where "whatever" could be any arbitrary string, all call exactly the same php file where it sorts out things to display (or shows a 404). However, I would like files along with other php files to operate normally (anything that's otherwise aliased, or that really is available within the file system).

An easy AliasMatch /* myphpfile.php (in the end another Aliases in httpd.conf) works fine by myself setup, but on the production server, the wildcard alias transmits the rest of the php files to myphpfile.php. I am unsure what else may be confusing things.

Technically the whatever string is going to be alphabetic minimizing situation, therefore it can filter for your, but all attempts I have created using regex's weren't effective.

Begin using these rules (you'll need mod_rewrite):

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

# do not do anything for already existing files
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]

RewriteRule ([a-z]+) /myfile.php [L]
  1. Devote .htaccess in website root folder. If placed elsewhere some fine-tuning might be needed.

  2. This can rewrite (internal redirect) all NON-EXISTING single-lowercase-word demands to /myfile.php, where using $_SERVER['REQUEST_URI'] script can pick which URL was known as and choose how to proceed (routing).

  3. This works for Web addresses like /whatever, but is going to do nothing for /what-ever, /hello/pinky, /hello123.