Knowledgebase
mod_rewrite rules
Posted by host4profit, 08-04-2010, 03:46 PM | Hello,
I am looking for a mod_rewrite rule (or other method) to redirect URLs.
I have a client that is using Wordpress. It is an active blog, and attackers tend to go after it from time to time.
They are sending floods of traffic to URLs like:
/blog/2003/12/
/blog/2007/06/
/blog/2009/01/
etc...
There is nothing after the URLs, those are the full URLs,
I am trying to create a mod_rewrite rule that will redirect this traffic. But, it needs to look for that specific URL. If there is additional information after the month part (ie: /12/ /06/), then I want it to pass through the mod_rewrite as normal.
So, filter:
/blog/2003/12/
but allow
/blog/2003/12/14/my_blog_title/
/blog/2003/12/14/
Thanks for any help!
David
|
Posted by Steven, 08-04-2010, 04:43 PM | How big is the flood? A rewrite rule would still allow it to consume apache resources.
What I would do is stick nginx infront of apache for that user (put the user on a dedicated ip). you can then kill off the requests with a nginx 444 http error code. It won't consume large amounts of resources that way.
|
|
Add to Favourites
Print this Article |
Also Read
nfs umask? (Views: 563)