For me I wanted this so that forms on my sites could be posted to the same URL that was used to request the page. &nbsp;Specifically, I didn&#39;t want the user to be taken to a different URL when there were form post errors, and I didn&#39;t want the server to issue a redirect back to the original URL to show an error message to the user.<div>
<br></div><div>For example, if the user is at <a href="http://mysite.com/contact">mysite.com/contact</a> and submits a form without filling out a required field, I wanted the user to remain at that location while viewing the error message and without a redirect. &nbsp;The only way I knew to do this was to set the form&#39;s action attribute to the &quot;static&quot; page&#39;s location (the current URL) and have nginx do a pass-through for form posts.</div>
<div><br></div><div>I should mention that my requirements might be different from what Dennis Cao (?) is trying to do. &nbsp;I&#39;ve written a content management system that caches pages at the request path when it receives &quot;get&quot; requests, so although my contact page is &quot;static&quot;, it may or may not exist before the request is made. &nbsp;As such, even for this static page, the &quot;get&quot; request may be passed through to the CMS anyway.</div>
<div><br></div><div>And because I wanted my application to have complete control over how &quot;post&quot; requests are handled, I configured nginx to pass all post requests through to the application regardless of the URL that was posted to.<br>
<br><div class="gmail_quote">On Mon, Dec 1, 2008 at 8:24 AM, Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d">On Mon, Dec 01, 2008 at 08:58:42PM +0800, ?? ???p wrote:<br>
<br>
&gt; hiya :<br>
&gt; &nbsp;Now I use the Nginx 7.x +tomcat 6.x<br>
&gt; &nbsp;I have some application should use post method to request &nbsp;tge static page<br>
&gt; &nbsp;but always filed &nbsp;i use the httpwatch to catch the package ,I find the url give the 405 code<br>
&gt; what should I do?<br>
&gt; thanks<br>
<br>
</div>What should static page do with a POST request ?<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br></div>