Forum Moderators: phranque
www.mydomain.com/page-url/anything/ or whatever that comes after /page-url/, even if that page exists. RewriteRule %{REQUEST_URI} ^(.*)$ [R=404,L] I tried this in .htaccessAnd it didn't crash your server? Huh. It looks as if you are mixing up two different syntaxes: the one for a RewriteRule and the one for a RewriteCond. All you need is
RewriteRule %{REQUEST_URI} ^(.*)$ [R=404,L]
RewriteRule ^directory/ - [R=404]
No closing anchor; that's how you ensure that the rule applies to the entire contents of the directory. You might even omit the final slash.