apache 設定 default index.php 為 DirectoryIndex page

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>

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s