当POST请求发送到" http://domain.com/directory/ "时,不会收到POST数据.但如果它被发送到" http://domain.com/directory/index.php ",则会收到.
如果只调用目录,我怎样才能使它工作?谢谢!
如果您正在运行Apache,请检查mod_dir模块是否已正确启用和配置.这些是我的dir.conf的内容:
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
Run Code Online (Sandbox Code Playgroud)
您是否尝试过使用 Firefox 的 HttpFox 之类的工具来查看当您单独向目录发出请求时是否会被重定向?我知道重定向可以杀死 POST 请求,因为它会转换为 GET 请求。