You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jon Block <jo...@collegepublisher.com> on 2005/03/23 16:53:50 UTC

[users@httpd] Quick and dirty way to block "cfm" and "cfc" file requests?

I'm trying to say "For this one specific virtual host, block any requests to
cfm and cfc files.

One thing to point out: the directory index order is set to "index.cfm,
index.html". That means that if a request comes into www.example.com and the
webserver tries to serve out index.html, that's okay. If it tries to serve
out index.cfm, it should fail.

I was thinking this would be the way to do it:

----------
<VirtualHost *>
 ServerName www.example.com
 DocumentRoot \\\\127.0.0.1\\bling

 <LocationMatch .*\.(cfm|cfc)>
  order deny,allow
  deny from all
 </LocationMatch>

</VirtualHost>
-----------

Can someone give me some pointers?

Jon


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org