Reputation: 4111
How to block an URL ended with 'select-a-plan.html' by htaccess? I tried
RewriteRule ^/select-a-plan.html$ - [F]
and
RewriteCond %{REQUEST_URI} ^/select-a-plan.html
RewriteRule ^(.*)$ - [F,L]
with no success
Upvotes: 2
Views: 433
Reputation: 133428
With your shown samples, could you please try following. Please clear your browser cache before testing your URLs.
RewriteEngine ON
RewriteRule select-a-plan\.html/?$ - [NC,F]
Fixes in OP's nice attempts:
/
to your regex ^/
will not match here.NC
FLAG of apache to enable ignorecase for matching any case file name.select-a-plan.html
will be at last of the uri so we need not to use ^
(caret) at first place because it assumes we are matching it from starting of uri.Upvotes: 3