Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to temporarily ban (only for 5-10 minutes) a certain ip address using .htaccess.

share|improve this question

closed as not constructive by Alex, mdpc, Khaled, Ward, John Gardeniers Jan 3 '13 at 10:08

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6  
Sure, remove it after 5-10 minutes. –  ceejayoz Jan 2 '13 at 21:27
add comment

1 Answer

You'll need a cron job that updates the htaccess file on a regular interval (5-10 mins if you want).

share|improve this answer
1  
And more importantly, a good reason to do this in an automated manner. –  ceejayoz Jan 2 '13 at 21:38
    
Really any script would do, doesn't have to be a cron job... but the question of why one would do such a thing with .htacess seems like the more pressing question to me. –  HopelessN00b Jan 2 '13 at 21:44
    
maybe he doesn't have full access to the system ? –  golja Jan 2 '13 at 22:32
    
You can create .htaccess files through php... –  Ian Jan 29 '13 at 0:32
add comment

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