【发布时间】:2017-03-16 09:45:32
【问题描述】:
我最近在运行 osx Yosemite 的 Mac 上安装了 Xampp (5.6.24)。 您好更改了 http.conf 文件中的文档根目录(路径为 /Xampp/etc/http.conf)并将名称更改为 Xampp htdocs 文件夹,但我的新 htdocs 文件夹始终重定向到仪表板页面。 我该如何解决?
【问题讨论】:
我最近在运行 osx Yosemite 的 Mac 上安装了 Xampp (5.6.24)。 您好更改了 http.conf 文件中的文档根目录(路径为 /Xampp/etc/http.conf)并将名称更改为 Xampp htdocs 文件夹,但我的新 htdocs 文件夹始终重定向到仪表板页面。 我该如何解决?
【问题讨论】:
您可能在 htdocs 文件夹中有 index.php 文件,这就是它重定向到仪表板的原因。
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/dashboard/');
exit;
?>
Something is wrong with the XAMPP installation :-(
in this header('Location: '.$uri.'/dashboard/');将您重定向到仪表板。
【讨论】: