Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Someone is sending malicious code through a form on Joomla.

I tried to delete the form but it didn't block the access.

The URI is /index.php?option=com_contact&task=view&contact_id=3&Itemid=45

How to write a rule on .htaccess that blocks access to this specific GET request?

share|improve this question

The following should work for Apache 2.4+:

<If "%{QUERY_STRING} =~ /option=com_contact&task=view&contact_id=3&Itemid=45/">
 Require All Denied

This uses a regular expression, that could be too specific, so you might have to adjust it.

share|improve this answer
Forgot to metion I don't know what is the version I'm working on. Most probably is 2.2. I'll send an email to the server admins. – Almino Melo Oct 23 '13 at 22:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.