apache 設定 default index.php 為 DirectoryIndex page
發表於 : 2014-08-20, 06:35
apache 設定 default index.php 為 DirectoryIndex page
有兩種作法:
1. 在該目錄下建立 .htaccess 檔案並在檔案中插入「DirectoryIndex index.php」字串。
The simplest way to accomplish this..
Create a .htaccess file in your web root.
Add the line…
DirectoryIndex index.php
2. 在 apache 設定檔「httpd.conf」的修改指定目錄預設索引頁值。
<Directory /myapp>
DirectoryIndex index.php
</Directory>
有兩種作法:
1. 在該目錄下建立 .htaccess 檔案並在檔案中插入「DirectoryIndex index.php」字串。
The simplest way to accomplish this..
Create a .htaccess file in your web root.
Add the line…
DirectoryIndex index.php
2. 在 apache 設定檔「httpd.conf」的修改指定目錄預設索引頁值。
<Directory /myapp>
DirectoryIndex index.php
</Directory>