簡體   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