【发布时间】:2016-03-14 04:08:43
【问题描述】:
我有一个网站:
example.com/index.html
有一个子文件夹(subsite):
example.com/subsite/different_index.html
different_index.html 包含一个表单:
<FORM action="different_index.html?action=edit">
但是,当单击此表单上的提交输入按钮时,页面会尝试重定向到:
example.com/subsite/subsite/different_index.html
我已尝试将表单操作设为所需的确切 url:
<FORM action="example.com/subsite/different_index.html?action=edit"> <!-- target self -->
但我仍然得到:
example.com/subsite/subsite/different_index.html
子网站在 URL 中重复。
任何想法如何正确定位此表单?
【问题讨论】:
-
您是否有一个实际的子站点(具有不同的域),或者您是否在站点中只有一个子文件夹(这不是子站点)。
-
其余的设置是什么样的?还有其他可能导致重定向的原因吗?
-
@ScottMarcus,它是一个子文件夹。顶级域“example.com”的一部分。
标签: html forms html-formhandler http-post