最近架設了Awstats(網站分析軟體,免費的喔),來看自己網站上的流量(雖然只有小貓兩三隻,而且大部份都只有我在用,哇哈哈哈^^")。但美中不足的是,分析出的結果中,搜尋的關鍵字句,只要是中文字就會變成亂碼。
不過我找到方法解決了。讓這美中不足的地方,變的更完美了。
之所以搜尋的關鍵字句會變成亂碼的原因,主要是因為現在的搜尋引擎都是使用UTF8,而Awstats是使用Big5,所以在顯示上會出現亂碼。
要解決此問題,就是把awstats設定中的LoadPlugin="decodeutfkeys"啟動。就可以了
# Plugin: DecodeUTFKeys
# Perl modules required: Encode and URI::Escape
# Allow AWStats to show correctly (in language charset) keywords/keyphrases
# strings even if they were UTF8 coded by the referer search engine.
#
LoadPlugin="decodeutfkeys"
不過在執行時,需要Perl的Encode 與 URI::Escape模組,所以如果在執行時出現錯誤,可以先把這兩個模組裝起來。然後再去執行網頁看看。
Leave a comment