<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=Restrict_POST_request_to_Website</id>
		<title>Restrict POST request to Website - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://briansnelson.com/index.php?action=history&amp;feed=atom&amp;title=Restrict_POST_request_to_Website"/>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=Restrict_POST_request_to_Website&amp;action=history"/>
		<updated>2026-06-04T06:18:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://briansnelson.com/index.php?title=Restrict_POST_request_to_Website&amp;diff=893&amp;oldid=prev</id>
		<title>Brian: Created page with &quot;==Restrict POST request to website==  Do you need to limit the POST requests to your site?  Best way to do that is allow only specific ips to POST to your site.   RewriteCond...&quot;</title>
		<link rel="alternate" type="text/html" href="https://briansnelson.com/index.php?title=Restrict_POST_request_to_Website&amp;diff=893&amp;oldid=prev"/>
				<updated>2016-06-03T11:29:55Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Restrict POST request to website==  Do you need to limit the POST requests to your site?  Best way to do that is allow only specific ips to POST to your site.   RewriteCond...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Restrict POST request to website==&lt;br /&gt;
&lt;br /&gt;
Do you need to limit the POST requests to your site?  Best way to do that is allow only specific ips to POST to your site.&lt;br /&gt;
&lt;br /&gt;
 RewriteCond %{REQUEST_METHOD} POST&lt;br /&gt;
 # allow the server to POST to itself&lt;br /&gt;
 RewriteCond %{REMOTE_ADDR} !127.0.0.1    &lt;br /&gt;
 # allow POST from trusted users&lt;br /&gt;
 RewriteCond %{REMOTE_ADDR} !123.456.789.123    &lt;br /&gt;
  # send all other post requests to 403 forbidden&lt;br /&gt;
 RewriteRule ^ / [F] &lt;br /&gt;
&lt;br /&gt;
If you would prefer to send post request to the home page of your site instead replace [F] in the last line with [R,L]&lt;br /&gt;
&lt;br /&gt;
You'd replace the / with where your &amp;quot;home page&amp;quot; is if it isn't just /.&lt;/div&gt;</summary>
		<author><name>Brian</name></author>	</entry>

	</feed>