1. index.php 2. index.html がある場合、どのファイルが最初にロードされるか誰か教えてください。
サーバー上のファイル?
同じドメインにワードプレス サイトをインストールしたいと同時に、適切にウェブサイトを立ち上げるまで、index.html ページを保留ページとしてロードしたいと考えています。これどうやってするの?
If you use Apache (which I assume you do since you tagged this with htaccess
) you can change your Apache config/htaccess's DirectoryIndex
property to include the order of priority of index files:
DirectoryIndex index.html index.htm index.php index.php4 index.php5
Here's the "algorithm":
index.html
exist in the current folder? If yes, then load it, if no, continue:index.htm
exist in the current folder? If yes, then load it, if no, continue:index.php
exist in the current folder? If yes, then load it, if no, continue:index.php4
exist in the current folder? If yes, then load it, if no, continue: index.php5
exist in the current folder? If yes, then load it, if no, continue:404
page not found errorWhich means you can create an index.html
file and then delete it once you want your site to run normally. Keep in mind that anyone can still access index.php
if they wish - they just need to specify it.
Thant actually depends on your DirectoryIndex
directive. Set it up as:
DirectoryIndex index.php index.html
This will load index.php
if it is available, if not then it will try to load index.html
.
.htaccess に入れます:
DirectoryIndex index.html index.php
サーバーは最初に古い html ページを読み込みます。