Apache 本地主机的默认文件 [英] Default file for Apache localhost

查看:24
本文介绍了Apache 本地主机的默认文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 apache2.当我输入 http://localhost 时,它会转到一个文件 http://localhost/class/index.php.我如何将其更改为 http://localhost/index.html 或任何其他页面?我将在哪个文件中找到执行此操作的设置?谢谢!

I have apache2 installed. When i type http://localhost it goes to a file http://localhost/class/index.php . How do i change it to say http://localhost/index.html or any other page? Which file will I find the setting to do this? Thanks!

推荐答案

Apache 不会触发 HTTP 重定向,除非您指示它这样做.

Apache will not trigger HTTP redirections unless you instruct it to do so.

我的建议是打开您喜欢的文本编辑器并在以下位置搜索 class 字符串:

My advice is that you open your favourite text editor and search for the class string in the following locations:

  • *.conf Apache 安装目录中的文件.
  • .htaccess HTML 目录中的文件.
  • *.conf files inside the Apache installation directory.
  • .htaccess files inside your HTML directores.

如果没有找到任何东西,您还可以在您的 *.php 代码中搜索 header() 调用.

If that fails to find anything, you could also search for header() calls in your *.php code.

这篇关于Apache 本地主机的默认文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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