macOS -- 为什么XAMPP启动后输localhost跳转到http://localhost/dashboard?
来源:互联网 发布:手机淘宝怎么用支付宝 编辑:程序博客网 时间:2024/05/21 18:09
在XAMPP环境下,当我们在地址栏输入‘localhost’的时候,进入的不是htdocs根目录下,而是直接跳转到了http://localhost/dashboard?下.
这是因为在xamppfiles/htdocs下有一个index.php文件
index.php
<?php if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { $uri = 'https://'; } else { $uri = 'http://'; } $uri .= $_SERVER['HTTP_HOST']; header('Location: '.$uri.'/dashboard'); exit;?>
该文件做了重定向,header到了http://localhost/dashboard,所以,你可以直接在这里修改我们想要跳转的地址,或者直接删掉本文件访问htdocs的所有文件
0 0
- macOS -- 为什么XAMPP启动后输localhost跳转到http://localhost/dashboard?
- 安装完magento后,其他电脑无法访问magento,URL自动跳转到http://localhost/magento
- 启动tomcat和myeclipse后,http://localhost:8080无法访问
- 在Eclipse中启动Tomcat后,http://localhost:8080/无法访问
- Eclipse中启动Tomcat后,http://localhost:8080/无法访问
- 启动tomcat后访问页面http://localhost:8080/报错
- angular学习:npm启动后不能访问http://localhost:8000/
- Eclipse中启动Tomcat后,http://localhost:8080/无法访问
- tomcat正常启动后http://localhost:8080/报错404
- tomcat正常启动后http://localhost:8080/报错404
- tomcat启动后,http://localhost:8080无法正常显示
- Eclipse中启动Tomcat后,http://localhost:8080/无法访问
- tomcat正常启动后http://localhost:8080/报错404
- myeclipse里tomcat启动后,输入http://localhost:8080/打不开
- tomcat正常启动后http://localhost:8080/报错404
- XAMPP访问localhost时总是重定向到localhost/xampp的问题
- http://localhost/
- 为什么访问http://localhost:8080…
- php上线教程----阿里云下设值二级域名并将项目上线
- PHP----重置阿里云主机的密码
- OC中的setter getter
- 天梯赛 5-7 输出GPLT
- PHP---如何修改域名的指定的根目录
- macOS -- 为什么XAMPP启动后输localhost跳转到http://localhost/dashboard?
- macOS --- 配置基于域名的虚拟主机
- lnmp -- 解决Warning: scandir() has been disabled for security reasons in…的问题
- macOS -- 如何通过终端开启/关闭SSH
- macOS -- Mac系统如何编辑hosts文件
- macOS -- Mac系统如何通过终端使用mysql
- [WebView]
- [置顶]2017最新PHP经典面试题目汇总(上篇)
- 欢迎使用CSDN-markdown编辑器