memo.xight.org

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

2005-12-14 Wed

全信協スパムクローラー対策

- mod_rewriteを利用

# For spambot
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTP_REFERER}     ^$
	RewriteCond %{REMOTE_HOST}      marunouchi\.tokyo\.ocn\.ne\.jp$
	RewriteCond %{HTTP_USER_AGENT}  "^Mozilla/4.0 \(compatible; MSIE 6\.0; Windows 98\)$"
	RewriteCond %{SERVER_PROTOCOL}  ^HTTP/1\.0$
	RewriteRule .* - [F,L]
</IfModule>


- [2006-04-17] 追記
World Wide Walker: 全信協spamクローラのフィルタ より引用
より多くの spam crawler 対策が可能に.
# For spambot
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteOptions inherit
	RewriteCond %{HTTP_REFERER}     ^$
	RewriteCond %{REMOTE_HOST}      marunouchi\.tokyo\.ocn\.ne\.jp$ [OR]
	RewriteCond %{REMOTE_HOST}      tokyo-ip\.dti\.ne\.jp$ [OR]
	RewriteCond %{REMOTE_HOST}      odn\.ad\.jp$ [OR]
	RewriteCond %{REMOTE_HOST}      tky\.mesh\.ad\.jp$ [OR]
	RewriteCond %{REMOTE_HOST}      ap\.gmo-access\.jp$
	RewriteCond %{HTTP_USER_AGENT}  "^Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows 98\)$"
	RewriteCond %{SERVER_PROTOCOL}  ^HTTP/1\.0$
	RewriteRule .* - [F,L]
</IfModule>


- 注意
通常,RewriteRule は下層ディレクトリにも引き継がれる.
別途 RewriteEngine On による Rewrite 設定をしている場合には,
以下の記述がないとルールが上書きされるようだ.
RewriteEngine On
RewriteOptions inherit

- Reference
KMsWiki: WiKicker - このWikiForumを提供しているWikiEngine
http://www.xdelta.net/wiki/WiKicker.html
羊堂日記 - 2005-06-27
http://sheepman.parfait.ne.jp/20040627.html#p01
羊堂本舗 ちょき - Rewrite Rule
http://sheepman.parfait.ne.jp/wiki/RewriteRule
void GraphicWizardsLair( void ); // - 2004-06-24
http://www.otsune.com/diary/2004/06/24.html
World Wide Walker: 全信協spamクローラのフィルタ
http://yoosee.net/d/archives/2006/04/04/002.html

カテゴリ: [Apache][Anti-spam]

Under Translation of ECMA-262 3rd Edition

- Reference
Under Translation of ECMA-262 3rd Edition
http://www2u.biglobe.ne.jp/~oz-07ams/prog/ecma262r3/
Standard ECMA-262 - ECMAScript Language Specification - 3rd edition (December 1999)
http://www.ecma-international.org/publications/standards/Ecma-262.htm

カテゴリ: [JavaScript]

JavaScript で連想配列

var hash = new Array();
hash['year']  = 2005;
hash['month'] = 12;
hash['date']  = 14;
 
var str = '';
for ( key in hash ){
	str += key + ":" + hash[key] + "\n";
}
alert(str);


- 追記
JavaScriptはObjectで連想配列を利用可能.
var hash = new Object();

- Reference
にっき - 2005-12-15
http://bigfield.ddo.jp/diary/20051215.html#p03

カテゴリ: [JavaScript]

マウスホイールイベントの登録

- Summary
prototype.js を読み込んだ後に wheel_event.js を読み込むと,
mousewheelイベントを扱えるようになる.
イベントハンドラの第二引数にホイールカウント(1 or -1)が入ってくる.

Event.observe(element, 'mousewheel', function(element, wheel_count){
	wheel_count == 1 ? alert('wheel up') : alert('wheel down');
});


- ブラウザのホイールを無効にする
event.preventDefault ? event.preventDefault() : (event.returnValue = false);


- Reference
mouse wheel event demo
http://rails2u.com/misc/wheel_event/
- via
2nd life - 2005-12-08 - prototype.js with mousehweel event
http://d.hatena.ne.jp/secondlife/20051208/1134020332

カテゴリ: [JavaScript]

自信を持ってApacheを操るために

- Reference
MODULE.JP - 「自信を持ってApacheを操るために」スライド公開
http://module.jp/blog/internet_week_2005T16.html
Internet Week 2005
http://internetweek.jp/
- via
cl.pocari.org - 2005-12-09 - 「自信を持って Apache を操るために」スライド公開
http://cl.pocari.org/2005-12-09-1.html

カテゴリ: [Apache]

Mobile Link Discovery 仕様

- Summary
XHTML/RSS/Atom においてモバイル版 URL へのリンクをメタデータに埋め込む仕様: Mobile Link Discovery について

- XHTML

<link rel="alternate" media="handheld" type="text/html" href="{mobile URL}" />


- Atom
<link rel="alternate" x:media="handheld" type="text/html" href="{mobile URL}" />


- RSS
<rss xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:link rel="alternate" media="handheld" type="text/html" href="{mobile URL}" />


- Reference
Six Apart - Docs: Mobile Link Discovery spec
http://www.sixapart.jp/docs/tech/mobile_link_discovery_en.html
Six Apart - Docs: Mobile Link Discovery 仕様
http://www.sixapart.jp/docs/tech/mobile_link_discovery_ja.html
- via
cl.pocari.org - 2005-12-09 - Mobile Link Discovery 仕様
http://cl.pocari.org/2005-12-09-4.html

カテゴリ: [HTML]

TypeKey

- Summary
Six Apartが提供するオンライン認証システム.

シックス・アパートでは、TypeKeyでの認証をあなたが作ったアプリケーションに組み込むことができるように
ドキュメントを提供する予定です。
また商用アプリケーションでTypeKeyを利用するときに必要な情報も同時期に提供する予定です。


- 取得してみた
http://profile.typekey.com/xight/

- Reference
Six Apart: TypeKey
http://www.sixapart.jp/typekey/

カテゴリ: [Memo]
2005-12 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Color Reference

ChangeLogを検索
携帯電話からアクセス!

カテゴリ

最近の話題

リンク

過去ログ

Google

QR Code

Since
2002-11-28
Update
2008-02-20 21:23
Copyright © 2005 xight.org All Rights Reserved.