Forum Moderators: phranque
[edited by: Lorel at 4:18 pm (utc) on May 21, 2018]
RewriteCond %{REQUEST_URI} !^/first-url-to-exclude\.php$
RewriteCond %{REQUEST_URI} !^/second-url-to-exclude\.php$
RewriteRule ^keyword1+[a-z]\.php$ - [G]
From what you said above it appears I need something more in my coding to specify any amount of characters and not just one.
RewriteCond %{REQUEST_URI} !^/keyword1(keywordA|keywordB)\.php$
RewriteRule ^keyword1[a-z]+\.php$ - [G] Thanks for the exclusion rule. I've been checking a Regex Character Definitions list but didn't see that option.
word1-word2(with number)-word3-word4.php (some of the file names have more or less words, which will come after the first word/number combination but there is only one word with a 1 number character). These words are all separated by dashes.
RewriteRule ^[a-z]+-([a-z]+[0-9]{1})-[a-z]+-[a-z]+\.php$ - [NC,G}
RewriteRule ^[a-z]+-[a-z]+[0-9](-[a-z]+)+\.php$ - [G]