403禁止错误发布PHP/HTML表格
最近,我遇到了一个问题,由于某些原因,在我单击网站中的“提交”按钮后,发布HTML表单立即造成“ 403禁止”错误。在单击“提交”按钮之前,该网页可以完美地加载。我的网站是用PHP编写的,并在Amazon EC2实例上运行。一切都很好,直到突然我开始遇到这个错误。我已经对此代码进行了大量的事先测试,由于某种原因,这才开始发生。
我尝试使用行以行制作.htaccess
文件:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
但这似乎没有做任何事情(我确实设置了启用所有
我的/var/var/var/www
目录我的php文件live)。
我只是不太确定该在哪里可以使用,因为代码与完全相同的形式完全很好,但是现在突然之间它不再起作用。我什至尝试评论我的PHP,只是没有逻辑提交表单即可遵循,但仍然看到此错误,所以我认为它不是代码问题,而是服务器上的Apache/PHP问题。
(我实际上不能发布太多的代码导致其作业)
I have recently run into an issue where for some reason posting a html form immediately results in a "403 forbidden" error as soon as I click the submit button in my website. The web page loads perfectly fine before the submit button is clicked. My website is written in PHP and is running on an Amazon ec2 instance. Everything was working perfectly fine until all of a sudden I started getting this error. I had done extensive prior testing of this code and for some reason this only started happening now.
I have tried making a .htaccess
file with the lines:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
but this doesn't seem to do anything (I did set EnableOveride All
for my /var/www
directory where my php files live).
I'm just not too sure where to go with this as the code was working perfectly fine with exactly the same form but now all of a sudden it no longer works. I even tried commenting out my php and just submitting the form with no logic to follow and still see this error so I don't think its a code issue but rather an apache/php issue on the server.
(I can't really post too much of my code cause its for an assignment)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案。我有一个Amazon Web应用程序防火墙,它阻止了HTML表格的发布。禁用此功能允许该表格正常发布。
I found the solution to this. I had an Amazon web application firewall that was blocking the posting of html forms. Disabling this allowed for the form to be posted as normal.