WordPress Site Breaks When a Visitor Searches for "insert"

32 Views Asked by At

A client that sells industrial plumbing parts just told me that their site breaks every time a visitor searches for an insert through their page. Basically rather than return the page of search results, we end up seeing the Welcome to Apache page that displays until you put a website in place.

Every other search term seems to work.

1

There are 1 best solutions below

0
On

(For a full description of the problem and the detailed troubleshooting steps, find the details at: http://www.reich-consulting.net/2015/06/09/ithemes-security-plugin-and-dangerous-search-queries/)

Solution:

The problem was caused by the iThemes Security plug-in, which tries to be helpful by adding .htaccess rules that block potentially dangerous data from being sent to WordPress. I popped open the .htaccess file and discovered the following rule:

RewriteCond %{QUERY_STRING} ^.*(request|concat|insert|union|declare).* [NC]

That rule causes any requests with "insert" in the query string to be dropped before it's ever passed to WordPress. Removing it allowed the site to function as expected.