Html 我的网站标题显示 / 的索引
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20235194/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
my website title showing index of /
提问by user3036182
Google search jobbulls website title showing index/
谷歌搜索 jobbulls 网站标题显示索引/
I have uploaded all of my files for my website. When I type in my domain name, I see a page titled "Index of /"that lists each of the files used to create my website. Can anyone tell me how to fix this?
我已经为我的网站上传了所有文件。当我输入我的域名时,我会看到一个标题为“Index of /”的页面,其中列出了用于创建我的网站的每个文件。谁能告诉我如何解决这个问题?
hi friends please solve this problem.
你好朋友请解决这个问题。
回答by RA'sal
It maybe the uploading folder problem. First of all you can try these 3 methods, Option 1– Upload Your Website via xxxx's File Manager Option 2– Uploading Your Website via FTP such as FileZilla Option 3– Uploading Your Website via cPanel's File Manager
可能是上传文件夹的问题。首先你可以试试这3种方法, 选项1——通过xxxx的文件管理器 上传你的网站选项2——通过FTP上传你的网站,比如FileZilla 选项3——通过cPanel的文件管理器上传你的网站
Select the option and start to upload.
Open the server folder and you may can see some folders like .htaccess
, public_html
.. Please open the folder public_html
and upload into it.
选择该选项并开始上传。打开服务器文件夹,您可能会看到一些文件夹,例如.htaccess
,public_html
.. 请打开文件夹 public_html
并上传到其中。
If you still see the problem, reupload the files again.
如果您仍然看到问题,请再次重新上传文件。
Thank you.
谢谢你。
回答by Vincent Duprez
Your first page should be called index.html
你的第一页应该被称为 index.html
In fact, it can be called a lot of names, this is the priority that will decide the one to display: (higher first)
其实它可以叫很多名字,这个是优先级决定显示的:(高在先)
index.html
index.shtml
index.php
index.htm
default.html
Default.htm
default.html
Default.html
default.shtml
Default.shtml
page1.html
index.pl
index.cgi
index.php3
index.phtml
home.htm
home.html
home.shtml
index.wml
based on the DirectoryIndex by Apache.
基于 Apache 的 DirectoryIndex。
Now as a second answer, if you uploaded the files and these contain a file listed above and it still doesn't work, then make sure you uploaded the files in the correct directory. Sometimes ftp brings you one level higher than what is called the 'webroot' check to see if there is no 'public_html' or 'www' or 'html_docs'. In that case, make sure your files are uploaded in this folders.
现在作为第二个答案,如果您上传了文件并且这些文件包含上面列出的文件但它仍然不起作用,那么请确保您将文件上传到正确的目录中。有时 ftp 会比所谓的“webroot”检查更高一级,以查看是否没有“public_html”或“www”或“html_docs”。在这种情况下,请确保您的文件上传到此文件夹中。
回答by GoodViber
Upload this line to your .htaccess file and see what happens
将此行上传到您的 .htaccess 文件,看看会发生什么
DirectoryIndex index.html index.php
DirectoryIndex index.html index.php
If that doesn't work, can you post the contents of your .htaccess file?
如果这不起作用,您可以发布 .htaccess 文件的内容吗?
This should work for a site coded with php.
这应该适用于用 php 编码的站点。
回答by richardpilgrim
You need an index or a page for the web server to serve up as the page for the site.
您需要 Web 服务器的索引或页面作为站点的页面。
To get started you could upload an "index.html" page and most web servers will serve this as their first page by default.
首先,您可以上传一个“index.html”页面,默认情况下,大多数网络服务器会将其作为它们的第一页。
回答by Hiren Patel
You need to set default pagefor your site and also need to turn off directory browsingfor securingyour site.you can do this both things via cpanel of your site.
您需要为您的站点设置默认页面,还需要关闭目录浏览以保护您的站点。您可以通过站点的 cpanel 执行这两项操作。
i hope this will help you.
我希望这能帮到您。
回答by MicroDev92
I had the same problem. This was because I used an capital 'I' as first i of index.html
. This did not work because 'Index.html' was not in my directory listings. The standard solution for this would be changing Index.html
to index.html
. (note the capital 'I' and the lowwer case 'i')
我有同样的问题。这是因为我使用了大写的“I”作为index.html
. 这不起作用,因为“Index.html”不在我的目录列表中。对此的标准解决方案将更Index.html
改为index.html
. (注意大写的“I”和小写的“i”)