I added
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} /article/
RewriteRule ! ^article/\d+ redirect.php [L]
to .htaccess
and got a .htaccess: RewriteRule: bad flag delimiters message. Reviewed the related questions here but they didn't help.
Compare
Yes, the second works. You can't have a space between the ! and the pattern. AFAICS this is not mentioned in the Apache docs.