我将制作简单的Web应用程序防火墙,如modsecurity . 我想在C中编写apache模块来过滤像SQL注入这样的Web攻击 .

我把我的网址放在 http://localhost/vulweb 我的问题是,当我访问 http://localhost/vulweb 时,我希望apache模块首先分析请求,然后再继续访问PHP网站(如果请求不是攻击) . 任何人都可以帮我解释如何为此目的制作模块吗?以及如何配置这个模块(sethandler,addhandler)??

PS:我已经知道如何用C编写helloworld apache模块,并通过 http://localhost/helloworld 运行它