XAMPP 本地主机重定向到本地主机/仪表板 [英] XAMPP localhost redirects to localhost/dashboard

查看:38
本文介绍了XAMPP 本地主机重定向到本地主机/仪表板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 xampp-win32-5.5.30,并且在 xampp 控制面板中,Apache 和 mysql 都启动没有任何错误,但我发现:

I've just installed xampp-win32-5.5.30 and in xampp control panel both Apache and mysql started without any error but I found:

1)localhost 在我的浏览器中重定向到另一个页面 localhost/dashboard/ 而不是 xampp 启动页面.

1)localhost in my browser redirects to another page localhost/dashboard/ and not the xampp start page.

2)localhost/xampp 显示以下内容:

2)localhost/xampp shows the following:

Index of /xampp

[ICO]   Name    Last modified   Size    Description
[PARENTDIR] Parent Directory        -    
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30 Server at localhost Port 80

C:\xampp\htdocs\index.php 文件中:

In C:\xampp\htdocs\index.php file:

<?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 :-(

安装有问题吗?

推荐答案

删除那个文件(index.php),你会得到 htdocs 文件夹中的目录和文件列表.

Delete that file(index.php), you will get the list of directories and files from htdocs folder.

这篇关于XAMPP 本地主机重定向到本地主机/仪表板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆