是否可以重定向帖子数据?
我有一个网站,其中所有请求都被静默地重定向到(通过),然后使用PHP来显示正确的页面(通过解析)。.htaccess
index.php
REQUEST_URI
我想知道是否有可能将POST数据也提交到假地址?
我目前有这样的表格...
<form action="/send-mail" method="post">
我的规则是....htaccess
# redirect mail posting to index
RewriteRule send-mail index.php?send-mail [NC,L]
我的检查工作正常。index.php
isset($_GET['send-mail'])
但是,这似乎会丢弃应发送给它的所有POST数据。
有没有办法保留帖子数据?我不想使用GET,因为它不能发送那么多信息,尽管对于简单的查询表单来说,这可能不是问题。
这是我的重定向到.htaccess
index.php
# serve files and dirs if they exist please, otherwise send to index
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php