|
|
#1 |
|
初心者
註冊日期: Jan 2008
文章: 287
積分: 10410
|
已經在網站上安裝了Xoops2繁體中文版,雖然一直希望能夠使用utf-8的版本作為網站的基本,但是由於國內大多數人都還是使用big-5,最重要的模組 Tad的線上電子書籍也是能夠支援中文直接轉出成PDF,這個功能很重要,所以也只好先將Apache中的一個網站預設編碼先改為big5:
由於我是在單一伺服器上對應不同的幾個網域,所以也設定了Apache的虛擬主機,讓不同的網址(網站),在實體目錄上都是分開來的→ (httpd.conf) ... ... AddDefaultCharset UTF-8 =>這樣就讓Apache預設編碼為utf-8 ... LanguagePriority tw en ... =>原則上就只是把最後的tw搬到最前面 ... NameVirtualHost *:80 ServerName www.Domain1.com ServerAdmin webmaster@domain1.com DocumentRoot "/var/www/domain1" AcceptPathInfo On ServerName www.Domain2.com ServerAdmin webmaster@domain2.com DocumentRoot "/var/www/domain2" AcceptPathInfo On AddDefaultCharset Big5 =>加上這行就會發現domain2的網站預設為Big5編碼 ※Apache的基本設定還滿簡單的,網站是可以很容易就跑起來, 但是進階的設定就沒那麼容易了, 像是許多CMS或是Blog都支援所謂的FancyURL, 就是把網址列的那ㄧ堆?xxid=...之類的改為像 /module/doc/1234...這樣, 對Google之類的搜尋引擎來說,據說比較容易辨識; 不過這個Apache的rewrite設定,我就一直沒成功過, 這是下一步努力的對象。 |
|
|
|
![]() |
| 目前檢視此主題的會員: 1 (0 位會員和 1 位遊客) | |
| 主題工具 | |
| 顯示模式 | |
|
|
相似的主題
|
||||
| 主題 | 主題作者 | 討論區 | 回覆 | 最後發表 |
| [CentOS] CentOS 5.0 準備起飛 | random67951 | CentOS / RedHat Linux | 0 | 04-28-2008 13:38 |
| [CentOS] 再次談談 CentOS | random67951 | CentOS / RedHat Linux | 0 | 04-28-2008 13:37 |
| [CentOS] 哈,計畫趕不上變化(Centos+MythTV) | random67951 | CentOS / RedHat Linux | 0 | 04-28-2008 13:29 |
| [CentOS] Centos 3.4 and 4.0 Release | random67951 | CentOS / RedHat Linux | 0 | 04-28-2008 13:28 |
| [CentOS] Web Server Optimization Guide for CentOS - RedHat | acid1031 | CentOS / RedHat Linux | 0 | 03-07-2008 12:13 |