Screenload
Screenload

Reputation: 439

Showing 404 even when blocked

I want to block a file that is accessed several times a day.

Therefore I tried to block it in .htaccess to avoid any php execution in WordPress:

<Files "/autodiscover/autodiscover.xml">  
  Order Allow,Deny
  Deny from all
</Files>

But still, WordPress is working and showing a 404 page. How can I just block this single file so WordPress is not displaying a 404 page?

Upvotes: 0

Views: 107

Answers (1)

MisterDebug
MisterDebug

Reputation: 923

I think something like this should work

RewriteEngine On
RewriteRule ^autodiscover/autodiscover.xml$ - [F]

F = forbidden

Upvotes: 1

Related Questions