I have built a joomla-based website, and serving it with Apache server. I am now have to build a module to check the legitimate of the request from URI, if the URI satisfies some constrains, Apache then lets it access the normal Joomla website, else returns HTTP_BAD_REQUEST.
For example, if the URI contains <script>
, Apache will return HTTP_BAD_REQUEST. Else, it lets the client access the joomla website. So how can I code the ELSE part.
static int my_apache_module_function(request_rec *r)
{
if (strstr(r->args, "<script>") != NULL)
{
return HTTP_FORBIDDEN;
}
else
//direct the client to normal joomla homepage.
//I need your help here. I am really thankful for any clues.
}