I would do something like:
# Don't rewrite if the request is for a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)(affiliate|registration)+(.*) index.php?action=notfound [QSA,L]
If there's always a / before, I would rather do:
# Don't rewrite if the request is for a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/(affiliate|registration)+(.*) index.php?action=notfound [QSA,L]
If there's always a / after, I would rather do:
# Don't rewrite if the request is for a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)(affiliate|registration)+/(.*) index.php?action=notfound [QSA,L]
If there's always a / before and after, I would rather do:
# Don't rewrite if the request is for a real file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/(affiliate|registration)+/(.*) index.php?action=notfound [QSA,L]