简体   繁体   English

网站只显示index.php的所有信息吗?

[英]site only shows all info from index.php?

Sorry if this is a basic question, but Im wondering why my site doesn't display correctly unless I utilize the index.php extension. 抱歉,这是一个基本问题,但是我想知道为什么除非使用index.php扩展名,否则我的网站无法正确显示。 Here is an example : 这是一个例子:

www.copishboutqiue.com/salon www.copishboutqiue.com/salon

which displays incorrectly but 显示不正确,但

www.copishboutique.com/salon/index.php displays the correct layout we're using. www.copishboutique.com/salon/index.php显示我们正在使用的正确布局。 Why do I need to use the index.php when this is the only file in the root directory? 当这是根目录中的唯一文件时,为什么需要使用index.php?

如果您使用的是Apache服务器,请在网站的根目录中创建一个.htaccess文件,然后添加

DirectoryIndex index.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM