#
# .htaccess
# Override Default Settings
#
# それ以前 ghal 記録無くした
# Wed,14 Jul,2004 - Sat,17 Jul,2004 ghal chroot
# Sun,08 Aug,2004 ghal Referer,ErrorDocument
# Thr,12 Aug,2004 ghal Debug
# Fri,13 Aug,2004 ghal add
# Mon,29 Nov,2004 ghal add deny bot
# Tue,14 Dec,2004 ghal support cgi
# Sun,26 Dec,2004 ghal add deny bot
# Wed,29 Dec,2004 ghal tune and fix
# Sun,16 Jan,2005 ghal correct rules
# Sun,23 Jan,2005 ghal fix, add markagent, add anonymizer
#
# ユーザページのアクセス制御は、
# ${CHROOT}/home 以下の .htaccess が使用され、
# ${CHROOT}/opt/documents/htdocs/.htaccess は参照されない。
# symlink 張ったけれど。
#
# http request の先頭の / は消されるらしい。
#
# *** In Generally, UserSide Override Is Not Permitted ***
#Options SymLinksIfOwnerMatch ExecCGI Includes
#DirectoryIndex index.html index.txt index.shtml index.htm index.cgi
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml # Obsolate?
#AddHandler server-parsed .shtml # New
#AddHandler cgi-script .pl
# Option
#SSLRequireSSL # Require https
# Authorization Mode
#AuthName "This area is access protected..."
#AuthType Basic
#AuthUserFile /var/home.fenix/fen025/http/.htpasswd
#AuthGroupFile /dev/null
#Require valid-user
# Additional FileType
#AddType text/x-server-parsed-html .shtml .ico # Obsolate?
#AddType application/x-httpd-cgi .cgi # Obsolate?
#AddType application/lha .lzh .lha
AddType text/plain .hed .txt .doc .me .ish .asc .md5 .awk
AddType image/mag .mag
# Customized Error Document
ErrorDocument 403 /~G-HAL/403.shtml
#ErrorDocument 404 /trap/index.shtml
#
# Reject Mail-address Collecting Robot by mod_rewrite
#
# *** mod_rewrite Is Not Often Permitted ***
RewriteEngine On
RewriteBase /
RewriteRule \.bak$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} ^$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^-$ [NC,OR]
RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.0$
RewriteRule ^.*$ - [F,L]
RewriteCond %{HTTP_USER_AGENT} sitecheck\.internetseer\.com [NC,OR]
RewriteCond %{HTTP_USER_AGENT} NPBot [NC,OR]
RewriteCond %{REMOTE_HOST} internetseer\.com [NC,OR]
RewriteCond %{REMOTE_ADDR} ^61\.115\.195\.(12[8-9]|1[3-8][0-9]|19[0-1])$ [OR]
RewriteCond %{REMOTE_ADDR} ^202\.32\.245\.(154|146)$ [OR]
RewriteCond %{REMOTE_ADDR} ^202\.232\.184\.50$ [OR]
RewriteCond %{HTTP_USER_AGENT} Internet-Html-Searcher [NC,OR]
RewriteCond %{REMOTE_ADDR} ^202\.234\.172\.([0-9]|[1-9][0-9]|1[01][0-9]|12[0-7])$ [OR]
RewriteCond %{HTTP_USER_AGENT} NABOT [NC,OR]
RewriteCond %{REMOTE_ADDR} ^220\.73\.165\.143 [OR]
RewriteCond %{HTTP_USER_AGENT} NaverRobot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} naver [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dloader [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^GoogleBot$ [OR]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *5\.5; *Windows *98; *DigExt\)" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^211\.101\.236\.79 [OR]
RewriteCond %{REMOTE_HOST} trafficmagnet\.com [NC,OR]
RewriteCond %{REMOTE_HOST} trafficmagnet\.net [NC,OR]
RewriteCond %{REMOTE_ADDR} ^202\.108\.221\.97$ [OR]
RewriteCond %{HTTP_USER_AGENT} trafficmagnet [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Internet *Explorer? *5\.x" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Internet *Explore? *5\.x" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^209\.47\.59\.158$ [OR]
RewriteCond %{HTTP_USER_AGENT} "DTS *Agent" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^202\.30\.94\.52$ [OR]
RewriteCond %{HTTP_USER_AGENT} Microsfot [NC,OR]
RewriteCond %{REMOTE_ADDR} ^63\.226\.33\.110$ [OR]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *4\.0; *Windows *95\)" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Microsoft *Internet *Explorer/4\.40\.426 *\(Windows *95\)" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^66\.43\.183\.194$ [OR]
RewriteCond %{REMOTE_HOST} mayatraining\.com [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MayaTraining [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Mail *Sweeper" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Zeus *2" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "hhjhj\@yahoo\.com" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Microsoft *URL *Control" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MailPickUp [NC,OR]
RewriteCond %{REMOTE_ADDR} ^219\.184\.44\.19$ [OR]
RewriteCond %{REMOTE_ADDR} ^221\.188\.78\.2$ [OR]
RewriteCond %{HTTP_USER_AGENT} "appie *1\.1 *\(www\.walhello\.com\)" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.0$
RewriteRule ^.*$ - [G,L]
RewriteCond %{REMOTE_ADDR} ^166\.102\.19\.181$ [OR]
RewriteCond %{HTTP_USER_AGENT} Netprospector [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^mogimogi/1\.0 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Crescent *Internet *ToolPak" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Email [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^NEWT *ActiveX" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebBandit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MidiSearchRobot [NC,OR]
RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.0$
RewriteRule !^robots\.txt$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} ^oBot$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ia_archiver$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} FAST-WebCrawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Microsoft-WebDAV-MiniRedir [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Yahoo-MMCrawler [NC,OR]
RewriteCond %{REMOTE_HOST} cpe\.net\.cable\.rogers\.com [NC,OR]
RewriteCond %{REMOTE_ADDR} ^80\.232\.169\. [OR]
RewriteCond %{REMOTE_ADDR} ^213\.59\.10[23]\. [OR]
RewriteCond %{REMOTE_HOST} h219-110-074-131\.catv01\.itscom\.jp [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Scooter [NC,OR]
RewriteCond %{REMOTE_ADDR} ^210\.157\.([0-9]|[0-2][0-9]|3[0-1])\. [OR]
RewriteCond %{REMOTE_ADDR} ^210\.172\.(12[8-9]|1[3-8][0-9]|19[0-1])\. [OR]
RewriteCond %{REMOTE_ADDR} ^210\.225\.108\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7]) [OR]
RewriteCond %{REMOTE_ADDR} ^211\.125\.(8[0-9]|9[0-5])\. [OR]
RewriteCond %{HTTP_USER_AGENT} "Indy *Library" [NC,OR]
RewriteCond %{REMOTE_ADDR} ^210\.249\.114\.([8-9]|1[0-5])$ [OR]
RewriteCond %{REMOTE_ADDR} ^219\.163\.2\.(4[8-9]|5[0-5])$ [OR]
RewriteCond %{REMOTE_ADDR} ^210\.158\.198\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])$ [OR]
RewriteCond %{REMOTE_ADDR} ^210\.233\.75\.(12[8-9]|1[3-5][0-9])$ [OR]
RewriteCond %{REMOTE_ADDR} ^68\.205\.4\.98$ [OR]
RewriteCond %{REMOTE_ADDR} ^24\.200\.112\.73$ [OR]
RewriteCond %{REMOTE_ADDR} ^207\.236\.223\.98$ [OR]
RewriteCond %{REMOTE_ADDR} ^168\.28\.160\.107$ [OR]
RewriteCond %{REMOTE_ADDR} ^218\.30\.13\.173$ [OR]
RewriteCond %{HTTP_USER_AGENT} Rexa [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MSFrontPage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Microsoft *Data *Access" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} WebDAV [NC,OR]
RewriteCond %{REMOTE_ADDR} ^127\.0\.0\.0$
RewriteRule !^robots\.txt$ - [G,L]
RewriteCond %{REMOTE_HOST} \.bbtec\.net
RewriteCond %{HTTP_REFERER} !^(http|https)://[a-z]
RewriteRule ^.*$ - [F,L]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *98\)"
RewriteCond %{REMOTE_HOST} \.tokyo\.ocn\.ne\.jp [OR]
RewriteCond %{REMOTE_HOST} \.ap\.net-access\.jp [OR]
RewriteCond %{REMOTE_HOST} \.ap\.yournet\.ne\.jp [OR]
RewriteCond %{REMOTE_HOST} \.tkyo\.nt\.adsl\.ppp\.infoweb\.ne\.jp [OR]
RewriteCond %{REMOTE_HOST} \.ppp\.dion\.ne\.jp
RewriteRule ^.*$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *5\.01; *Windows *NT *5\.0; *MyIE2\)"
RewriteCond %{REMOTE_HOST} \.ppp\.dion\.ne\.jp
RewriteRule ^.*$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *NT *5\.1; *SV1\)"
RewriteCond %{REMOTE_HOST} -acca\.tokyo\.ocn\.ne\.jp
RewriteRule ^.*$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/4\.0 *\(compatible; *MSIE *5\.5; *Windows *98; *Win *9x *4\.90\)"
RewriteCond %{REMOTE_HOST} \.west\.dup\.ppp\.infoweb\.ne\.jp
RewriteRule ^.*$ - [G,L]
RewriteCond %{HTTP_USER_AGENT} ^1\.0$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^[\.0-9]*$ [NC]
RewriteRule ^.*$ /~G-HAL/record/ [L]
# for TEST
RewriteRule rewrite_test - [F,L]
RewriteRule redirect_test /~G-HAL/trap/index.shtml [R,L]
RewriteRule forbidden_test - [F,L]
RewriteRule gone_test - [G,L]
RewriteRule proxy_test http://www.fenix.ne.jp/~G-HAL/trap/index.shtml [P,L]
#RewriteCond %{REMOTE_HOST} \.jp\.private$
#RewriteRule ^robots\.txt$ - [G,L]
#RewriteCond %{REMOTE_ADDR} ^10\. [OR]
#RewriteCond %{REMOTE_ADDR} ^172\.21\. [OR]
#RewriteCond %{REMOTE_ADDR} ^192\.168\.
#RewriteRule ^robots\.txt\.bak$ - [F,L]
# for TRAP
RewriteRule .+/trap/$ /~G-HAL/trap/index.shtml [L]
RewriteRule ^trap/((?!index\.shtml)|(index\.shtml.+)) /~G-HAL/trap/index.shtml [L]
# for SYSTEM-MESSAGES
#RewriteRule ^((?!(maintenance\.html|trap/index.shtml))|(maintenance\.html.+)) /~G-HAL/maintenance.html [L]
#
# Reject Mail-address Collecting Robot by mod_setenvif
#
Order deny,allow
BrowserMatchNoCase "^$" ROBOT_AGENT
BrowserMatchNoCase "^-$" ROBOT_AGENT
Deny from env=ROBOT_AGENT
BrowserMatchNoCase "sitecheck\.internetseer\.com" ROBOT_AGENT
BrowserMatchNoCase "NPBot" ROBOT_AGENT
SetEnvIf Remote_Host "internetseer\.com" ROBOT_AGENT
SetEnvIf Remote_Addr "^61\.115\.195\.(12[8-9]|1[3-8][0-9]|19[0-1])$" ROBOT_AGENT
SetEnvIf Remote_Addr "^202\.32\.245\.(154|146)$" ROBOT_AGENT
SetEnvIf Remote_Addr "^202\.232\.184\.50$" ROBOT_AGENT
BrowserMatchNoCase "Internet-Html-Searcher" ROBOT_AGENT
SetEnvIf Remote_Addr "^202\.234\.172\.([0-9]|[1-9][0-9]|1[01][0-9]|12[0-7])$" ROBOT_AGENT
BrowserMatchNoCase "NABOT" ROBOT_AGENT
SetEnvIf Remote_Addr "^220\.73\.165\.143" ROBOT_AGENT
BrowserMatchNoCase "NaverRobot" ROBOT_AGENT
BrowserMatchNoCase "naver" ROBOT_AGENT
BrowserMatchNoCase "dloader" ROBOT_AGENT
BrowserMatch "GoogleBot" ROBOT_AGENT
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *5\.5; *Windows *98; *DigExt\)" ROBOT_AGENT
SetEnvIf Remote_Addr "^211\.101\.236\.79" ROBOT_AGENT
SetEnvIf Remote_Host "trafficmagnet\.com" ROBOT_AGENT
SetEnvIf Remote_Host "trafficmagnet\.net" ROBOT_AGENT
SetEnvIf Remote_Addr "^202\.108\.221\.97$" ROBOT_AGENT
BrowserMatchNoCase "trafficmagnet" ROBOT_AGENT
BrowserMatchNoCase "^Internet *Explorer? *5\.x" ROBOT_AGENT
BrowserMatchNoCase "^Internet *Explore? *5\.x" ROBOT_AGENT
SetEnvIf Remote_Addr "^209\.47\.59\.158$" ROBOT_AGENT
BrowserMatchNoCase "DTS *Agent" ROBOT_AGENT
SetEnvIf Remote_Addr "^202\.30\.94\.52$" ROBOT_AGENT
BrowserMatchNoCase "Microsfot" ROBOT_AGENT
SetEnvIf Remote_Addr "^63\.226\.33\.110$" ROBOT_AGENT
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *4\.0; *Windows *95\)" ROBOT_AGENT
BrowserMatchNoCase "Microsoft *Internet *Explorer/4\.40\.426 *\(Windows *95\)" ROBOT_AGENT
SetEnvIf Remote_Addr "^66\.43\.183\.194$" ROBOT_AGENT
SetEnvIf Remote_Host "mayatraining\.com" ROBOT_AGENT
BrowserMatchNoCase "MayaTraining" ROBOT_AGENT
BrowserMatchNoCase "Mail *Sweeper" ROBOT_AGENT
BrowserMatchNoCase "^Zeus *2" ROBOT_AGENT
BrowserMatchNoCase "hhjhj\@yahoo\.com" ROBOT_AGENT
BrowserMatchNoCase "Microsoft *URL *Control" ROBOT_AGENT
BrowserMatchNoCase "MailPickUp" ROBOT_AGENT
SetEnvIf Remote_Addr "^219\.184\.44\.19$" ROBOT_AGENT
SetEnvIf Remote_Addr "^221\.188\.78\.2$" ROBOT_AGENT
BrowserMatchNoCase "appie *1\.1 *\(www\.walhello\.com\)" ROBOT_AGENT
Deny from env=ROBOT_AGENT
SetEnvIf Remote_Addr "^166\.102\.19\.181$" ROBOT_AGENT
BrowserMatchNoCase "Netprospector" ROBOT_AGENT
BrowserMatchNoCase "^mogimogi/1\.0" ROBOT_AGENT
BrowserMatchNoCase "^CherryPicker" ROBOT_AGENT
BrowserMatchNoCase "^Crescent *Internet *ToolPak" ROBOT_AGENT
BrowserMatchNoCase "^Email" ROBOT_AGENT
BrowserMatchNoCase "^NEWT *ActiveX" ROBOT_AGENT
BrowserMatchNoCase "^WebBandit" ROBOT_AGENT
BrowserMatchNoCase "MidiSearchRobot" ROBOT_AGENT
Deny from env=ROBOT_AGENT
BrowserMatchNoCase "^oBot$" ROBOT_AGENT
BrowserMatchNoCase "^ia_archiver$" ROBOT_AGENT
BrowserMatchNoCase "FAST-WebCrawler" ROBOT_AGENT
BrowserMatchNoCase "Microsoft-WebDAV-MiniRedir" ROBOT_AGENT
BrowserMatchNoCase "Yahoo-MMCrawler" ROBOT_AGENT
SetEnvIf Remote_Host "cpe\.net\.cable\.rogers\.com" ROBOT_AGENT
SetEnvIf Remote_Addr "^80\.232\.169\." ROBOT_AGENT
SetEnvIf Remote_Addr "^213\.59\.10[23]\." ROBOT_AGENT
SetEnvIf Remote_Host "h219-110-074-131\.catv01\.itscom\.jp" ROBOT_AGENT
BrowserMatchNoCase "Scooter" ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.157\.([0-9]|[0-2][0-9]|3[0-1])\." ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.172\.(12[8-9]|1[3-8][0-9]|19[0-1])\." ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.225\.108\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])" ROBOT_AGENT
SetEnvIf Remote_Addr "^211\.125\.(8[0-9]|9[0-5])\." ROBOT_AGENT
BrowserMatchNoCase "Indy *Library" ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.249\.114\.([8-9]|1[0-5])$" ROBOT_AGENT
SetEnvIf Remote_Addr "^219\.163\.2\.(4[8-9]|5[0-5])$" ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.158\.198\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])$" ROBOT_AGENT
SetEnvIf Remote_Addr "^210\.233\.75\.(12[8-9]|1[3-5][0-9])$" ROBOT_AGENT
SetEnvIf Remote_Addr "^68\.205\.4\.98$" ROBOT_AGENT
SetEnvIf Remote_Addr "^24\.200\.112\.73$" ROBOT_AGENT
SetEnvIf Remote_Addr "^207\.236\.223\.98$" ROBOT_AGENT
SetEnvIf Remote_Addr "^168\.28\.160\.107$" ROBOT_AGENT
SetEnvIf Remote_Addr "^218\.30\.13\.173$" ROBOT_AGENT
BrowserMatchNoCase "Rexa" ROBOT_AGENT
BrowserMatchNoCase "MSFrontPage" ROBOT_AGENT
BrowserMatchNoCase "Microsoft *Data *Access" ROBOT_AGENT
BrowserMatchNoCase "WebDAV" ROBOT_AGENT
Deny from env=ROBOT_AGENT
SetEnvIf Remote_Host "\.bbtec\.net" BBTEC_NET
SetEnvIf Referer "^(http|https)://[a-z]" !BBTEC_NET
Deny from env=BBTEC_NET
SetEnvIf Request_Protocol "[Hh]" NOT_WIN98
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *98\)" !NOT_WIN98
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *98\)" GRAY_WIN98
SetEnvIf Remote_Host "\.tokyo\.ocn\.ne\.jp" GRAY_WIN98_HOST
SetEnvIf Remote_Host "\.ap\.net-access\.jp" GRAY_WIN98_HOST
SetEnvIf Remote_Host "\.ap\.yournet\.ne\.jp" GRAY_WIN98_HOST
SetEnvIf Remote_Host "\.tkyo\.nt\.adsl\.ppp\.infoweb\.ne\.jp" GRAY_WIN98_HOST
SetEnvIf Remote_Host "\.ppp\.dion\.ne\.jp" GRAY_WIN98_HOST
SetEnvIf NOT_WIN98 1 !GRAY_WIN98_HOST
Deny from env=GRAY_WIN98_HOST
SetEnvIf Request_Protocol "[Hh]" NOT_MYIE2
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *5\.01; *Windows *NT *5\.0; *MyIE2\)" !NOT_MYIE2
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *5\.01; *Windows *NT *5\.0; *MyIE2\)" GRAY_MYIE2
SetEnvIf Remote_Host "\.ppp\.dion\.ne\.jp" GRAY_MYIE2_HOST
SetEnvIf NOT_MYIE2 1 !GRAY_MYIE2_HOST
Deny from env=GRAY_MYIE2_HOST
SetEnvIf Request_Protocol "[Hh]" NOT_SV1
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *NT *5\.1; *SV1\)" !NOT_SV1
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *6\.0; *Windows *NT *5\.1; *SV1\)" GRAY_SV1
SetEnvIf Remote_Host "-acca\.tokyo\.ocn\.ne\.jp" GRAY_SV1_HOST
SetEnvIf NOT_SV1 1 !GRAY_SV1_HOST
Deny from env=GRAY_SV1_HOST
SetEnvIf Request_Protocol "[Hh]" NOT_WIN9X
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *5\.5; *Windows *98; *Win *9x *4\.90\)" !NOT_WIN9X
BrowserMatchNoCase "Mozilla/4\.0 *\(compatible; *MSIE *5\.5; *Windows *98; *Win *9x *4\.90\)" GRAY_WIN9X
SetEnvIf Remote_Host "\.west\.dup\.ppp\.infoweb\.ne\.jp" GRAY_WIN9X_HOST
SetEnvIf NOT_WIN9X 1 !GRAY_WIN9X_HOST
Deny from env=GRAY_WIN9X_HOST
# 代理巡回?サービス
# http://www.markagent.com/service.html
BrowserMatchNoCase "User-Agent: *Mozilla/4\.07 *\[ja\_JP\.EUC\] *\(X11; *I; *MarkAgent *FreeBSD *2\.2\.8-RELEASE *i386; *Nav\)" GRAY_MARKAGENT
BrowserMatchNoCase "MarkAgent" GRAY_MARKAGENT
# PROXY
BrowserMatchNoCase "Mozilla/3\.01 *\[ja\] *\(via *THE *ANONYMIZER\!\)" ANONYMIZER_PROXY
BrowserMatchNoCase "Mozilla/2\.0 *\(TuringOS; *Turing *Machine; *0\.0\)" ANONYMIZER_PROXY
BrowserMatchNoCase "Mozilla/4\.78 *\(TuringOS; *Turing *Machine; *0\.0\)" ANONYMIZER_PROXY
BrowserMatchNoCase "ANONYMIZER" ANONYMIZER_PROXY
BrowserMatchNoCase "Turing" ANONYMIZER_PROXY
BrowserMatchNoCase "Mozilla/3\.01 *\(compatible;\)" ANONYMIZER_PROXY
SetEnvIf Referer "^(http|https)://[a-z]" !ANONYMIZER_PROXY
Deny from env=ANONYMIZER_PROXY
BrowserMatchNoCase "^1\.0$" ROBOT_AGENT
BrowserMatchNoCase "^[\.0-9]*$" ROBOT_AGENT
SetEnvIf Request_URI "\.bak$" DENY_BY_SETENVIF
SetEnvIf Request_URI setenvif_test DENY_BY_SETENVIF
Deny from env=DENY_BY_SETENVIF
SetEnvIf Referer "^http://www\.fenix\.ne\.jp/~G-HAL/" AdmissibleRef
SetEnvIf Referer "^http://www\.fenix\.ne\.jp\.private/~G-HAL/" AdmissibleRef
SetEnvIf Referer "^https://www\.fenix\.ne\.jp/~G-HAL/" AdmissibleRef
SetEnvIf Referer "^https://www\.fenix\.ne\.jp\.private/~G-HAL/" AdmissibleRef
# 指定ロボットは拒絶
Deny from env=ROBOT_AGENT
#Deny from all
# Order deny,allow の場合、デフォルト許可、Allow の結果が優先。
# Order allow,deny の場合、デフォルト拒絶、Deny の結果が優先。
# エラーメッセージ、トラップは無条件許可
# ↑正規表現の場合、チルダが付く。
Order deny,allow
Allow from all
Order deny,allow
Allow from all
# 直接取得を禁止
Order allow,deny
Deny from env=ROBOT_AGENT
Deny from env=GRAY_MARKAGENT
Allow from env=AdmissibleRef
#
#Order allow,deny
#Deny from env=ROBOT_AGENT
#Deny from env=GRAY_MARKAGENT
#Allow from env=AdmissibleRef
#
Order allow,deny
Deny from env=ROBOT_AGENT
Deny from env=GRAY_MARKAGENT
Allow from env=AdmissibleRef
# 手動アクセスのみ許可
# ↑cgi の引数は含まれないらしい。
Order deny,allow
Deny from env=ROBOT_AGENT
Deny from env=GRAY_MARKAGENT
Order deny,allow
Deny from env=ROBOT_AGENT
Deny from env=GRAY_MARKAGENT
# [ EoF ]