Xampp 重定向到 /xampp
Xampp redirects to /xampp
我刚刚在我的 xampp 上安装了 codeIgniter,但每当我尝试转到它的文件夹 (localhost/ci) 时,它都会将我带到 localhost/xampp
找不到还需要做什么。
将 htdocs
文件夹中的 index.php
重命名为 index1.php
、
然后尝试访问 http://localhost
,
现在您将看到 Apache 的默认目录列表,而不是 XAMPP 主页。
如果您想回到默认的 XAMPP 主页,请将 index1.php
重命名为 index.php
将您的 codeigniter 项目放在 xampp 的 htdocs 文件夹中并不是真的有必要。您也可以将其保存在其他地方。
要 运行 它,请转到 C:\xampp\apache\conf\httpd.conf 并将行 DocumentRoot "/home/user/www" 替换为您喜欢的行。
"index.php" 保存在 htdocs 目录中作为重定向。
- 用记事本或其他编辑器打开此文件。
这一行:
header('Location: '.$uri.'/xampp/');
将xampp替换成你的网站目录名即root:
header('Location: '.$uri.'/bulandshahr/');
您的网站将正常运行。
我刚刚在我的 xampp 上安装了 codeIgniter,但每当我尝试转到它的文件夹 (localhost/ci) 时,它都会将我带到 localhost/xampp
找不到还需要做什么。
将 htdocs
文件夹中的 index.php
重命名为 index1.php
、
然后尝试访问 http://localhost
,
现在您将看到 Apache 的默认目录列表,而不是 XAMPP 主页。
如果您想回到默认的 XAMPP 主页,请将 index1.php
重命名为 index.php
将您的 codeigniter 项目放在 xampp 的 htdocs 文件夹中并不是真的有必要。您也可以将其保存在其他地方。 要 运行 它,请转到 C:\xampp\apache\conf\httpd.conf 并将行 DocumentRoot "/home/user/www" 替换为您喜欢的行。
"index.php" 保存在 htdocs 目录中作为重定向。
- 用记事本或其他编辑器打开此文件。
这一行:
header('Location: '.$uri.'/xampp/');
将xampp替换成你的网站目录名即root:
header('Location: '.$uri.'/bulandshahr/');
您的网站将正常运行。