Unless you want to manually list the approved company names in your .htaccess file (which looks UGLY) I'd suggest this:
RewriteEngine On
RewriteRule (.*)-contact$ /contact.php?company_name=$1 [L,QSA,NC]
and then in your contact.php
- determine if valid company name - check db or whatever method you are using. (Make sure to escape the input)
- if not valid you have a couple options:
- redir to your default 404 page
- issue an intelligent warning page (ie include suggestions for alternate spelling that is in the db) and set a 404 header. (better IMO)
- if similar company name in the db possibly redirect to that with a note at the top of the page