公告:Drupal Taiwan 網域名稱更換

原本沒想要做 official 的繁體中文支援站,不過計畫趕不上變化 :)
現有網址 tw-drupal.info 將於 2007/2/1到期,新申請了 drupaltaiwan.org 的網域,即日起請改用此網址,包括可能訂閱的RSS、收錄的書籤或我的最愛等。期間若有網址的任何問題,歡迎回報與建議。

這期間也要告訴搜尋引擎,我們搬家了。但我不太會設 apache 的 url rewrite/redirect,誰可以指導一下?

DrakeGuan 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

不是很懂你的意思,換了個新的 domain name 和設 apache 的 urlrewrite 有什麼關係?

jimmy 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

VirtualHost 後面的ip要設一下
DocumentRoot 和ServerAdmin要再設一下

<VirtualHost 140.122.145.18>
    ServerAdmin walai0928@gmail.com
    DocumentRoot /home/name/public_html/eelc/
    ServerName tw-drupal.info
    RedirectMatch ^/$ http://drupaltaiwan.org
    RewriteEngine on
    RewriteRule   ^/(.*)  http://drupaltaiwan.org/$1  [R,L]
</VirtualHost>

其實,還得掃一下comment和revision兩個table裡頭內文的http://tw-drupal.info,全部取代成http://drupaltaiwan.org

charlesc 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

因為目前搜尋引擎找到的資料,都是 tw-drupal.info 的,必須在這段期間內,讓搜尋引擎知道 tw-drupal.info 將不存在,改成索引 drupaltaiwan.org。

如此一來,等舊網址真正消失時,透過搜尋引擎找到的本站資料,才不會連到舊站而找不到資料。

DrakeGuan 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

嗯....原來如此,沒想到這點 :)

DrakeGuan 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

突然想到,也許要一同處理一下 rss 的 url?

kourge 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

稍微看了一下這個網站的教學。.htaccess 要可能要這樣寫:

RewriteCond %{HTTP_HOST} tw-drupal\.info$
RewriteRule ^(.*)$       http://drupaltaiwan.org/$1 [R=301,L]

如果使用者或搜尋引擎連到的是舊的網域,會進行重新導向,而且會送出 HTTP 狀態碼 301,意為 "Moved Permanently" (永久移動),所以搜尋引擎會特別更新索引內的網址。
試試看行不行。

charlesc 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

感謝 kourge,我要的就是這種,我會試試看!

charlesc 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

成功了,感謝 :)

kourge 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

嗯,剛剛看了一下 Live HTTP headers,成功了:

GET /node/689 HTTP/1.1
Host: tw-drupal.info
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: zh-tw,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: Big5,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: PHPSESSID=7044e58b3fcd6be02c0ee2de90f68c15

HTTP/1.x 301 Moved Permanently
Date: Thu, 28 Dec 2006 20:54:34 GMT
Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.4 mod_ssl/2.8.22 OpenSSL/0.9.7e
Location: http://drupaltaiwan.org/node/689
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

DrakeGuan 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

右上角的聯結「是 primary links?」的版型,網址好像忘了更新到了 :)

kourge 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

http://themes.drupaltaiwan.org/ 似乎還沒設定好?

charlesc 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

Drupal 版型大觀園 的網址也換了,試試看吧!

kourge 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

RewriteCond %{HTTP_HOST} themes\.tw-drupal\.info$
RewriteRule ^(.*)$ http://themes.drupaltaiwan.org/$1 [R=301,L]

這個應該能夠也把版型大觀園一起轉...

kourge 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

對了,tw-drupal\.info$ 後面要加 [NC],所以變成這樣:

RewriteCond %{HTTP_HOST} tw-drupal\.info$ [NC]
RewriteRule ^(.*)$ http://drupaltaiwan.org/$1 [R=301,L]

RewriteCond %{HTTP_HOST} themes\.tw-drupal\.info$ [NC]
RewriteRule ^(.*)$ http://themes.drupaltaiwan.org/$1 [R=301,L]

這樣即使有人打 tHeMeS.tW-dRuPaL.iNfO 也能轉。[NC] 即 no case,不分大小寫。

charlesc 的照片

Re: 公告:Drupal Taiwan 網域名稱更換

都改了,感謝 kourge !