<?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>XML-RPC - Matteo Cisilino</title>
	<atom:link href="https://www.cisilino.com/en/tag/xml-rpc-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cisilino.com/en/</link>
	<description>Guide su WordPress, server e sicurezza</description>
	<lastBuildDate>Fri, 30 Oct 2026 16:06:19 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>Hardening / IDS: the .htaccess rules</title>
		<link>https://www.cisilino.com/en/2026/10/30/hardening-ids-htaccess-rules/</link>
					<comments>https://www.cisilino.com/en/2026/10/30/hardening-ids-htaccess-rules/#respond</comments>
		
		<dc:creator><![CDATA[matteocisilino]]></dc:creator>
		<pubDate>Fri, 30 Oct 2026 16:05:39 +0000</pubDate>
				<category><![CDATA[CSDN manual]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Cisilino Site Defense Network]]></category>
		<category><![CDATA[XML-RPC]]></category>
		<guid isPermaLink="false">https://www.cisilino.com/?p=1049</guid>

					<description><![CDATA[<p>The Hardening / IDS tab of the plugin CSDN, rule by rule: what it blocks, what it can break, and why custom paths must be written with care.</p>
<p>The post <a href="https://www.cisilino.com/en/2026/10/30/hardening-ids-htaccess-rules/">Hardening / IDS: the .htaccess rules</a> first appeared on <a href="https://www.cisilino.com/en/">Matteo Cisilino</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>WordPress hardening in the CSDN plugin sits entirely in one tab: “Hardening / IDS”. It&#8217;s five switches and one text field. They are there to close doors that almost no site genuinely uses. They are all off, and you turn them on one at a time.</p>
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" src="https://www.cisilino.com/wp-content/uploads/2026/10/manuale-csdn-hardening-ids.webp" alt="Diagram of WordPress with the Hardening / IDS tab of the plugin CSDN: WordPress hardening" width="1200" height="630"/></figure>
<h2>Where to find WordPress hardening</h2>
<p>Open <strong>Settings &gt; Cisilino Site Defense Network</strong> (point 1 in the image). Then click the <strong>Hardening / IDS</strong> tab (point 2). In the tab you&#8217;ll find three sections, in this order:</p>
<ul>
<li>point 3: under the heading “Hardening / access control (IDS)”, the row “.htaccess rules”.</li>
<li>point 4: “WordPress”.</li>
<li>point 5: “Custom paths to block”.</li>
</ul>
<p>At the top the tab says: “Optional rules applied at server level (.htaccess) or in WordPress. All off by default: only turn them on if you know they won&#8217;t conflict with the site&#8217;s themes or plugins.” At the bottom there&#8217;s a single button: “Save hardening rules”.</p>
<h2>What it&#8217;s for</h2>
<p>The rules reduce the attack surface. Three switches write to the <code>.htaccess</code> file, as does the custom paths field. Two switches are WordPress filters. This isn&#8217;t a firewall and it doesn&#8217;t analyse requests: here “IDS” means rules for accessing files and folders.</p>
<h2>The .htaccess rules (point 3)</h2>
<h3>Block PHP execution in wp-content/uploads</h3>
<p>The full label is “Block PHP execution in wp-content/uploads (protection against shells uploaded as an &#8220;image&#8221;)”. The plugin replies with 403 to any request for a file with extension <code>php</code>, <code>php3</code>, <code>php4</code>, <code>php5</code>, <code>php7</code>, <code>php8</code>, <code>php9</code>, <code>phtml</code>, <code>phps</code>, <code>phar</code> or <code>pht</code> whose address contains <code>/wp-content/uploads/</code>. Capital letters don&#8217;t matter.</p>
<p>It only works with Apache 2.4 (it needs the mod_authz_core module: without it, the rule does nothing and doesn&#8217;t report that). On nginx the <code>.htaccess</code> file is ignored and no rule in this tab has any effect, aside from the WordPress filters. It covers the standard uploads folder, not a custom one. It can break plugins that genuinely serve PHP files from that folder. To know whether it works on your site, use the test in the <a href="https://www.cisilino.com/en/?p=980">Test tab</a> chapter.</p>
<h3>Disable directory listing for folders without an index</h3>
<p>It writes a single line: <code>Options -Indexes</code>. Opening a folder with no index page will now show a 403 error instead of the file listing. If you use a folder as a public list of downloads, that listing disappears.</p>
<h3>Block direct access to wp-config.php, .htaccess, readme.html, debug.log</h3>
<p>The plugin writes a rule for each name and replies with 403. The check is on the file&#8217;s name, not its path. It therefore applies to any file with that name in any folder on the site, even inside other plugins. A plugin that publishes its own <code>readme.html</code> or <code>debug.log</code> will be blocked.</p>
<h2>The WordPress rules (point 4)</h2>
<p>These two WordPress hardening rules are PHP filters. They don&#8217;t touch <code>.htaccess</code>.</p>
<h3>Disable XML-RPC</h3>
<p>The label is “Disable XML-RPC (brute force/pingback, almost never needed on modern sites)”. The <code>xmlrpc.php</code> file stays in place, but WordPress refuses the XML-RPC methods that require login. <strong>Warning:</strong> this stops the WordPress mobile app, part of Jetpack&#8217;s functions, and publishing from external clients. The <code>pingback.ping</code> method doesn&#8217;t require login, and the filter doesn&#8217;t stop it: don&#8217;t rely on this rule to close down pingbacks. Trackbacks don&#8217;t use XML-RPC and aren&#8217;t affected. The plugin&#8217;s connection to the panel doesn&#8217;t use XML-RPC either, so it isn&#8217;t affected.</p>
<h3>Block user enumeration via ?author=N</h3>
<p>If the request contains the <code>author</code> parameter with a value (other than empty or <code>0</code>), the public site shows “Not found.” with a 404 response. <strong>Warning:</strong> this rule doesn&#8217;t protect the REST API. The user list at <code>/wp-json/wp/v2/users</code> stays reachable. Some themes and plugins use <code>?author=</code> to filter archives, and these will be blocked.</p>
<h2>Custom paths to block (point 5)</h2>
<p>This text field is for anyone who wants to close a specific folder, for example <code>/wp-content/uploads/old-backup/</code>. Write one path per line. Empty lines are ignored.</p>
<p>Each line is <strong>literal text</strong>. Capital letters matter, and the part after the <code>?</code> in the address isn&#8217;t compared. The help text under the field talks about “patterns”, but none exist here. There are no wildcards: <code>*</code>, <code>^</code> and <code>$</code> count as plain characters. The plugin blocks with 403 any address that <strong>contains</strong> that string, anywhere within it. That&#8217;s why the path <code>/wp-content/uploads/old-backup/</code> also blocks <code>/blog/wp-content/uploads/old-backup/x</code>.</p>
<p>This field has no switch. The rule is active as soon as the field isn&#8217;t empty and you save.</p>
<p><strong>Warning:</strong> if you write <code>/</code> or <code>wp</code> you block the whole site, admin area included. To get back you would need to fix <code>.htaccess</code> via FTP. Even a string such as <code>/uploads/</code> blocks every image. Avoid the <code>%</code> character in paths.</p>
<h2>Default values</h2>
<p>Five switches off and an empty field. The settings live in the <code>csdn_hardening</code> option.</p>
<h2>How to use it</h2>
<p>Take it slowly: WordPress hardening is done one rule at a time.</p>
<ol>
<li>Make a copy of <code>.htaccess</code> before you start.</li>
<li>Tick a single rule.</li>
<li>Click “Save hardening rules”.</li>
<li>Check that the site opens and that the admin panel works.</li>
<li>Move on to the next rule.</li>
</ol>
<p>After saving you are taken back to the General tab, not the one you saved. At the top you&#8217;ll find the notice. On success it says “Hardening rules saved and applied.”. On failure it says “Settings saved, but writing to .htaccess failed (permissions?). The rules are not active.”. With the failure, the two PHP filters stay active regardless.</p>
<p><strong>Warning:</strong> the plugin makes no backup of <code>.htaccess</code> whatsoever. It doesn&#8217;t even check the syntax before writing. A rule that your server doesn&#8217;t support can cause a 500 error across the whole site. On a multisite network the file belongs to the network: the error hits every site.</p>
<h2>What happens behind the scenes</h2>
<p>The plugin writes between two markers: <code># BEGIN Cisilino Site Defense Network - Hardening</code> and the matching <code># END</code>. The rest of the file is untouched. A second, separate block holds the blocked IPs. If you deactivate the plugin, both blocks are emptied. If you turn everything off and save, the hardening block stays empty.</p>
<h2>If something goes wrong</h2>
<p>If the site shows a 500 error after WordPress hardening, open <code>.htaccess</code> via FTP. Delete the lines between the two hardening markers. Then try again with fewer rules. If nothing is written to the file, check the permissions on <code>.htaccess</code>.</p>
<p>For a wider view of good practice, read the official guide to <a href="https://developer.wordpress.org/advanced-administration/security/hardening/" target="_blank" rel="noopener">hardening WordPress</a>: it explains other measures that sit outside the plugin.</p>
<p>Previous chapter: <a href="https://www.cisilino.com/en/?p=977">Blocked IPs tab: reading the blacklist</a>. Next chapter: <a href="https://www.cisilino.com/en/?p=979">Upload monitoring and the integrity check</a>. For the full list of chapters go back to the <a href="https://www.cisilino.com/en/?p=972">introduction to the manual</a>.</p><p>The post <a href="https://www.cisilino.com/en/2026/10/30/hardening-ids-htaccess-rules/">Hardening / IDS: the .htaccess rules</a> first appeared on <a href="https://www.cisilino.com/en/">Matteo Cisilino</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.cisilino.com/en/2026/10/30/hardening-ids-htaccess-rules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
