0

I have a WordPress site which is hosted on AWS lightsail (Load balancer with few instances running apache).

Site is getting 1000s of request per minute with URL like site.com/?872837 The number in the URL is dynamic which forces my cache plugin (Hummingbird) to create a new cache page and not use the existing cached page.

Lighsails load balancer doesn't provide any logs so I can't check which IPs are hitting the site.

Can I use .htaccess to remove that query string of this format (I tried searching but couldn't find anything)?

Riya
  • 9
  • 1
  • There is little sense in checking IP addresses when dealing with a DDOS... – arkascha Nov 24 '20 at 15:47
  • Take a look at the documentation of the `QSD` flag the rewriting module provides: https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_qsd – arkascha Nov 24 '20 at 15:48
  • thanks @arkascha but I don't want to discard all the query strings but just the ones as shown in above format. As you can see in this case the query string doesn't has any value. Also, the query string is dynamic and will make it difficult to use any static rule. – Riya Nov 26 '20 at 04:17
  • Of course you can test for such a query string pattern using a simple `RewriteCond` (documented in the same documentation...). And _then_ use the `QSD` flag. – arkascha Nov 26 '20 at 07:03

0 Answers0