<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bloggings Most Wanted&#187; ModSecurity</title>
	<atom:link href="http://www.bloggingsmostwanted.com/tag/modsecurity/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggingsmostwanted.com</link>
	<description>Blogging Tips, Blog Directory, Web Hosting Guide and more.</description>
	<lastBuildDate>Sun, 02 May 2010 00:57:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>404 Error When Adding or Updating a WordPress Post</title>
		<link>http://www.bloggingsmostwanted.com/404-error-when-adding-or-updating-a-wordpress-post/</link>
		<comments>http://www.bloggingsmostwanted.com/404-error-when-adding-or-updating-a-wordpress-post/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:19:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Problems and Solutions]]></category>
		<category><![CDATA[ModSecurity]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.bloggingsmostwanted.com/404-error-when-adding-or-updating-a-wordpress-post/</guid>
		<description><![CDATA[I stumbled across this problem when I recently switched hosts. At first I thought it was related to my latest WordPress upgrade but after further investigation I found it was related to ModSecurity. ModSecurity provides request filtering and other security features to the Apache HTTP Server. Basically when you add a new post, or edit [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across this problem when I recently switched hosts. At first I thought it was related to my latest WordPress upgrade but after further investigation I found it was related to ModSecurity. ModSecurity provides request filtering and other security features to the Apache HTTP Server. Basically when you add a new post, or edit an existing post, the request is filtered through a list of checks to look for possible security problems like intrusion attacks.</p>
<p>In my case the post was triggering a SQL Injection attack warning so Mod Security was 404 redirecting the request. Mod Security was concerned because my post contained the word &#8220;select&#8221; followed by the word &#8220;from&#8221;. It did not seem to care that these words were 2 paragraphs apart?</p>
<p><strong>How to Fix This Problem?</strong></p>
<p>I am sure that there are many ways to fix this problem. ModSecurity is installed for a reason, and does offer some benefits so anything you can do to selectively fix problems you are having with ModSecurity is better than completely deactivating it. In my case I was able to see that the filter triggering the problem had an ID of 300016. I was able to tell ModSecurity to &#8220;skip/remove&#8221; this filter by adding the following to the virtual host block in my apache configuration file:</p>
<p>&lt;Location &quot;/wp-admin/&quot; &gt;<br />
   SecRuleRemoveById 300016<br />
&lt;/Location&gt;</p>
<p>Notice that I only removed this rule from requests in the /wp-admin/ directory. In theory ModSecurity should still utilize this rule to detect SQL Injection attacks in other directories. If you don&#8217;t have access to http.conf you can also use .htaccess directives to control ModSecurity from within .htaccess files. It&#8217;s probably best to contact your host to see if they are using ModSecurity and to see what they suggest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggingsmostwanted.com/404-error-when-adding-or-updating-a-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
