php - Using .htaccess to block URL containing a keyword only if it is not containing another keyword -
this odd situation, hammering our servers http requests trying access different tinymce based editors. want block url containing keyword editor
have valid working urls containing same word ... example letter-from-editor.html
or editorial-board.html
is there way using .htaccess can contain url containing keyword editor
if doesn't contain keyword html
?
this trying right blocks editor
only
rewriterule (^|/)editor(/|$) - [f,l]
i searched , couldn't find way around it. thanks
you need add simple condition:
rewritecond %{request_uri} !html rewriterule (^|/)editor(/|$) - [f,l]
Comments
Post a Comment