The server is temporarily unable to service your request due to the site owner reaching his/her bandwidth limit. Please try again later.
http://www.sharksbeer.com/index.php/xxxblog
改寫之後,卻會像這裡一樣成為:
http://www.sharksbeer.com/weblog/xxxblog
1.將預設的首頁檔案名稱改成您所要的名稱 (這裡以"index.php" -> “weblog",亦即小站的作法為範例說明)。
2.因此第一步就是將"index.php"改名為"weblog"。但是沒有了.php的副檔名之後,Web Server如何知道這是一個php執行檔呢?請在首頁目錄之下 (一般虛擬主機為public_html) 加入一個 .htaccess 檔案,檔案內容如下:
<Files weblog>
ForceType application/x-httpd-php
</Files>
DirectoryIndex weblog index.php index.html index.htm
3.如此一來就是告訴 Web Server,將名稱為 weblog 的檔案視為 php 的檔案,同時先找名為 weblog 的檔案作為首頁檔案。也就是說,輸入 http://www.sharksbeer.com 時,Web Server就會先找weblog的檔案作為首頁,並將此首頁視為 weblog.php 加以執行。
4.接著是到: Control Panel Home › Admin › General Configuration 畫面上的 name of your website's index file 設定更改首頁檔案名稱。因為我們剛剛已經將"index.php"改為"weblog"了,所以這兒要稍作修改。