繁体   English   中英

如何将默认索引设置为index.html

[英]how to set default index to index.html

我正在建立wordpress网站,但尚未完成。 我想将访问http://domain.com的访问者重定向到http://domain.com/under-construction,但我希望能够看到我的index.php ...

我尝试将名称更改为index.html index.htm default.asp .....它们都不起作用。

如果我使用htaccess它将所有页面重定向到index.html,所以它不起作用。

有任何想法吗? 谢谢...

在您的根博客目录中,将其放置在您的.htaccess文件中:

DirectoryIndex index.html

您可以使用一个插件: http : //wordpress.org/extend/plugins/maintenance-mode/

在/.htaccess中,按照Sudhir的建议进行编写。 在/index.php中编写require('./ under-construction / wp-blog-header.php');。 / under-construction /和/under-construction/index.php中没有.htaccess写入require('./ wp-blog-header.php');。 那就是我的情况。

暂无
暂无

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

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