How-to: use pre hooks to block particular files

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,197
Location
LT, EU
One customer asked how to block xmlrpc and wp-trackback files globally using OpenLiteSpeed:
Code:
RewriteRule ^/(xmlrpc|wp-trackback)\.php - [F,L,NC]
I'd suggest adding this code to /usr/local/directadmin/data/templates/custom/cust_openlitespeed.CUSTOM.5.pre and rewriting confs then:
Code:
cd /usr/local/directadmin/custombuild
./build rewrite_confs
It requires DA 1.58 RC2 or later :)
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,197
Location
LT, EU
Likely, not sure :) This was a support ticket asking how to add the RewriteRule globally, so, I thought it might be useful to post on the forums about the use of custom pre/post hooks for templates.

Thank you!
 
Top