html - 向网站发布数据时在 URL 中隐藏 index.php
问题描述
我有一个索引文件,www.myserver.com/download/index.php
当用户访问www.myserver.com/download
时index.php
自动加载,但没有显示在浏览器 URL 框中 (=ok)
现在我需要将数据发布到同一个index.php
文件中。
当我按照以下方式进行操作时,index.php 会在发布后显示在浏览器 URL 中(=bad)。
<form action="index.php" method="post">
<input type="submit" name="testpost" value="TEST" />
</form>
当我按照以下方式执行此操作时,POST 数据会丢失(=坏)。
<form action="../download" method="post">
<input type="submit" name="testpost" value="TEST" />
</form>
向 index.php 发布数据后如何隐藏它?该解决方案不应隐藏index.php
整个服务器上的所有内容,而应仅隐藏这个特定的一个。
我试图制定一个 .htaccess 规则来隐藏“下载”目录中的 index.php,但我的知识是让它工作起来很糟糕。
解决方案
推荐阅读
- javascript - JavaScript (react) 模块中的函数在没有声明关键字的情况下定义
- javascript - 从消息中删除前缀 - 错误:.split 不是函数
- javascript - 我正在设计一个 chrome 扩展,它将在页面上搜索文本并进行超链接。我在超链接文本时遇到问题
- web3 - 调用以太坊智能合约函数时处理错误
- javascript - 有没有办法通过 onclick 函数呈现获取的数据
- gcc - 说服 cmake 在 MSYS2 中找到诅咒?
- flutter - Flutter 使用 Text 和 Icon 而不是单个 Icon 创建 PopupMenuButton
- generics - 通用结构中索引容器的向量
- c++ - 奇怪的 QPushButton 错误
- android - 具有多个实例的导航视图模型