提交表单后页面重定向时发生HTTP 405 - 资源被禁止错误

[ 2008-10-27 10:31:05 | 作者: admin ]
字号: | |
p.s.发现在有些服务器上,
当表单提交时没有指定action ,文件名为默认首页名称,如:index.asp(提交后使用 response.Redirect 跳转到别的页面时),会出现 “HTTP 405 - 资源被禁止错误” ,虽然在指定了action后可以恢复正常,但产生问题的原因目前还不明白。


以下是网上的引用
----------------------------------------------
测试用例:
正确代码:
<form method="post" action="index.asp">
<input type="text" name="a">
</form>
<%
If request("a") = "test" then
      response.redirect "index.asp"
end if
%>

错误代码:
<form method="post">
<input type="text" name="a">
</form>
<%
If request("a") = "test" then
      response.redirect "index.asp"
end if
%>
[最后修改由 admin, 于 2008-10-27 12:59:36]
评论Feed 评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=1182

这篇日志没有评论。

此日志不可发表评论。