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. Specifically, I didn't want the user to be taken to a different URL when there were form post errors, and I didn'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. The only way I knew to do this was to set the form's action attribute to the "static" page'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. I've written a content management system that caches pages at the request path when it receives "get" requests, so although my contact page is "static", it may or may not exist before the request is made. As such, even for this static page, the "get" 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 "post" 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"><<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>></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>
> hiya :<br>
> Now I use the Nginx 7.x +tomcat 6.x<br>
> I have some application should use post method to request tge static page<br>
> but always filed i use the httpwatch to catch the package ,I find the url give the 405 code<br>
> what should I do?<br>
> 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>