The following rewrite passes a string starting with the number 4 as a variable to process.php :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(4[^/]*)$ /process.php?variable=$1 [L]
So this
http://www.domain.com/4shopping
is mapped to
http://www.domain.com/process.php?variable=4shopping
But I want to extend this last rewrite rule to basically state:
if word begins with 4, map to /process.php?variable=$1
else map to /index.php
The second (else) part of this statement is the basic WordPress rewrite rule. So for example:
http://www.domain.com/shopping
which has no 4 will be directed to
http://www.domain.com/index.php?shopping (I believe this is how WordPress permalinks work!)