How to properly set URL rewrite rules for a php script to only accept POST

Posted by stormist on Stack Overflow See other posts from Stack Overflow or by stormist
Published on 2010-06-01T20:15:08Z Indexed on 2010/06/01 20:23 UTC
Read the original article Hit count: 132

Filed under:
|
|

I have a rewrite rule for GET and POST:

<LocationMatch "^/my/script/dir/?$">
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$


    RewriteRule .* /resources/scripts/storage/admin/list.php


    Script POST /resources/scripts/storage/admin/create.php
</LocationMatch>

How would I modify it to only allow POST?

© Stack Overflow or respective owner

Related posts about php

Related posts about linux