【发布时间】:2016-09-11 22:57:40
【问题描述】:
我正在尝试使用 xampp 中的标头位置重定向页面,但它不起作用并重定向到 localhost/dashboard
我使用以下代码在 localhost 中进行简单重定向,我将我的站点放在 htdocs/test/ 中,其中的文件是 index.html 和 index.php,index.php 代码如下
<?php
header("Location:/index.html");
?>
当我尝试访问 http://localhost/test/index.php 时,它不会访问 localhost/test/index.html 但它正在重定向到http://localhost/dashboard/
【问题讨论】:
-
-
不,我没有空间
-
检查这个链接是我的帮助stackoverflow.com/questions/11072042/…
-
不,它不是同样的问题
-
@Amit Ray 它用于实时服务器,但我的问题在于 localhost
标签: php apache .htaccess redirect xampp