Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 向站点发布数据时在URL中隐藏index.php_Html_Apache_Server - Fatal编程技术网

Html 向站点发布数据时在URL中隐藏index.php

Html 向站点发布数据时在URL中隐藏index.php,html,apache,server,Html,Apache,Server,我在www.myserver.com/download/index.php 当用户访问www.myserver.com/download时,index.php会自动加载,但不会显示在浏览器URL框中(=ok) 现在我需要将数据发布到相同的index.php文件中 当我按照以下方式进行操作时,index.php会在发布(=错误)后显示在浏览器URL中 当我按照下面的方法操作时,POST数据会丢失(=坏) 在向index.php发布数据后,如何隐藏index.php? 解决方案不应该隐藏整个

我在
www.myserver.com/download/index.php
当用户访问
www.myserver.com/download
时,
index.php
会自动加载,但不会显示在浏览器URL框中(=ok)

现在我需要将数据发布到相同的
index.php
文件中

当我按照以下方式进行操作时,index.php会在发布(=错误)后显示在浏览器URL中


当我按照下面的方法操作时,POST数据会丢失(=坏)


在向index.php发布数据后,如何隐藏index.php? 解决方案不应该隐藏整个服务器上的所有
index.php
,而应该只隐藏这个特定的


我试图制定一个.htaccess规则,将index.php隐藏在“download”目录中,但据我所知,要使其正常工作是非常糟糕的。

听起来您的服务器正在发送重定向(这将POST转换为get)。不要这样做。我只有FTP访问权限,无法更改apache设置,因为它受到我的提供商的限制。我试图建立一个htaccess规则,但没有成功…我的知识太差了:-(
<form action="index.php" method="post">
    <input type="submit" name="testpost" value="TEST" />
</form>
<form action="../download" method="post">
    <input type="submit" name="testpost" value="TEST" />
</form>