たつをの ChangeLog

3 件 見つかりました。

サイトの引越し・移動にともない、
旧Webページへのアクセスを他のURLへ飛ばす方法のメモ。
とっさに思い出せなかったりしがちなので、
自ブログ検索で済むようにここに書いておく。

(1) CGIだとこの方法。

Location: http://example.com/

追記061024: ご指摘を受け追加しました。ありがとうございます。

Status: 301 Moved Permanently
Content-type: text/html
Location: http://example.com/

ついでにサンプルCGI(perl):

#!/usr/bin/perl -T
use CGI;
my $q = new CGI;
print $q->header(-status => "301 Moved Permanently",
                 -type => "text/html", -charset => 'UTF-8',
                 -location => "http://example.com/");
...


(2) 静的なHTMLファイルだとこの方法。

<html><head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://example.com/">
</head></html>

追記061025: ご指摘を受け親切版(↓)。ありがとうございます。

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://example.com/">
...
</head>
<body>
<h1>移転しました!</h1>
<a href="http://example.com/">http://example.com/</a>
</body>
</html>


(3) Apache の設定(.htaccess, httpd.conf)による方法。

RedirectPermanent /blog/ http://blog.example.com/


参考:
- .htaccessでリダイレクト機能を利用する方法
  http://www.shtml.jp/htaccess/redirect.html

古籏 一浩さんによる prototype.js のリファレンス。
これはよいかも!

prototype.js リファレンス
http://www.openspc2.org/JavaScript/Ajax/ref/prototype.js/ver1.4/

このページはAjaxライブラリの1つであるprototype.jsのリファレンスです。
このリファレンスはver 1.4.0を基準としています。


ref. prototype.js http://prototype.conio.net/

Ajax

ラレコ先生の「やわらか戦車」と「くわがたツマミ」の本が出てますね。
(see ウェブテント http://www.geocities.jp/jugongordie/)

ラレコ / やわらか戦車


ラレコ / くわがたツマミ

たつをの ChangeLog

Powered by chalow