regex - htaccess blocking requests to /? -
i getting ton of bots or hitting site urls like: www.website.com/?how-much-does-a-ventolin-inhaler-cost-in-canada
i have no idea are, doesn't resolve on site causing significant mysql overhead index has heavy queries.
i can't seem figure out how stop these via htaccess because of question mark...
i thinking this:
rewriteengine on rewritecond %{request_uri} /\?^ rewriterule .*$ - [f,l]
but no dice.
all values found after "?" in url called query string parameters. entire website not use query string parameters? may want careful before removing every request query string parameter, because that's pretty common way of using internet.
if want strip them, following code work.
rewriteengine on rewritecond %{query_string} !="" rewriterule . - [f,l]
however, blocks requests page contain query parameters. spam page without query parameters if knew caused issue lead denial of service you.
this whole issue sounds there's more systemic issue beneath - shouldn't causing significant overhead people hit default page.
Comments
Post a Comment