æºå¸¯é»è©±ããã®ã¢ã¯ã»ã¹ãå¼¾ãäºã¤ã®æ¹æ³(in iMonaServer)
ã¨ãããã¨ã§2chæ¬ã¹ã¬ãé¢ç½ããã¨ã«ãªã£ã¦ããé¢ç½ã話é¡ãåºã¦ããã®ã§ã¡ãã£ãã調ã¹ã¦æ¸ãã¦ã¿ã¾ããã
ï¼ãããé¢ç½ãäºã«ã¯ãªã£ã¦ãªããâ話é¡âã«ã¯ãªã£ã¦ããã©orzï¼
iMonaServerã¹ã¯ãªããä¸ã§å¼¾ãã
2.cgiå ã®ã
if($ENV{'HTTP_USER_AGENT'} =~ m/SoftBank/i){ # SoftBank print "Content-type: application/Java\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m|UNTRUSTED/\d\.\d|i || $ENV{'HTTP_USER_AGENT'} =~ m|Vodafone/.+? Java/|){ #Vodafone 3G print "Content-type: application/java\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m/PHONE\/[4-9]\./i || $ENV{'HTTP_USER_AGENT'} eq ''){#jphone P4 P5 W print "Content-type: application/Java\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m/PHONE\/3\./i){ # jphone C4 print "Content-type: text/vnd.sun.j2me.app-descriptor\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m/DoCoMo/i){ # DoCoMo print "Content-type: text/plain\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m/KDDI/i){ # au print "Content-type: application/octet-stream\n"; } else { print "Content-type: text/plain\n"; }
ã
if($ENV{'HTTP_USER_AGENT'} =~ m/SoftBank/i){ # SoftBank exit(); } elsif($ENV{'HTTP_USER_AGENT'} =~ m|UNTRUSTED/\d\.\d|i || $ENV{'HTTP_USER_AGENT'} =~ m|Vodafone/.+? Java/|){ #Vodafone 3G exit(); } elsif($ENV{'HTTP_USER_AGENT'} =~ m/PHONE\/[4-9]\./i || $ENV{'HTTP_USER_AGENT'} eq ''){#jphone P4 P5 W exit(); } elsif($ENV{'HTTP_USER_AGENT'} =~ m/PHONE\/3\./i){ # jphone C4 exit(); } elsif($ENV{'HTTP_USER_AGENT'} =~ m/DoCoMo/i){ # DoCoMo print "Content-type: text/plain\n"; } elsif($ENV{'HTTP_USER_AGENT'} =~ m/KDDI/i){ # au print "Content-type: application/octet-stream\n"; } else { print "Content-type: text/plain\n"; }
ã¨æ¸ãå ããã
ããã«ããSoftBankã¨J-PHONEã®æºå¸¯ããã®ã¢ã¯ã»ã¹ãç¡è¦ããã
exitããé§ç®exit()ãããªãã¨mod_perlã§ã®å®è¡æã«ãããããªã£ã¡ããã
.htaccessã使ãã»ãã®ï¼ï¼mod_rewriteå¿ é çï¼
.htaccessã使ãã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ããè¦ã¦å¼¾ãã
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^(\J-PHONE|Vodafone|SoftBank)
RewriteRule ^$ /mobile/ [R]
.htaccessã使ãã»ãã®ï¼
SoftBankã®éçºè
ç¨ãµã¤ãã«ããIPã®å¸¯åãå
¨ã¦å¼¾ãã
https://creation.mb.softbank.jp/web/web_ip.html
order allow,deny
allow from all
# SoftbankIP帯å(2009/08/21æç¹)
deny from 123.108.236.0/24
deny from 123.108.237.0/27
deny from 202.179.204.0/24
deny from 202.253.96.224/27
deny from 210.146.7.192/26
deny from 210.146.60.192/26
deny from 210.151.9.128/26
deny from 210.175.1.128/25
deny from 211.8.159.128/25
ãã®æ¹æ³ãä¸çªããã®ã ãåé¡ãä¸ã¤ããã
å
ã»ã©ã®ãã¼ã¸ã«æ¸ãã¦ããIP帯åãªã®ã ãããã¼ã¸ä¸é¨ã«ã
æ¬æ å ±ã¯ããã¾ã§ãç®å®ã¨ãã¦ãåç §ãã ããã æ¬IPã¢ãã¬ã¹å¸¯å以å¤ããã½ãããã³ã¯æºå¸¯é»è©±ã®ã¢ã¯ã»ã¹ããªãäºãä¿è¨¼ãããã®ã§ã¯ããã¾ããã
ã¨æ¸ãã¦ãããã¤ã¾ãã¯å
¬å¼èªãããã®IP帯åã¯ä¿¡ç¨ã§ããã¼ã( ï¾Ð´ï¾)コï¾ï¾ï½§!ã¨è¨ã£ã¦ããã®ã ã
ã¡ãªã¿ã«ããããæºå¸¯ãã£ãªã¢ã®åé¡ã¯ãã®æåãªé«æ¨æµ©å
ããã話é¡ã«ãã¦ããã
é«æ¨æµ©å
ï¼ èªå®
ã®æ¥è¨
é話ä¼é¡ã
ã¨ããããã§è²ã
ãªæ¹æ³ã§æºå¸¯ãã£ãªã¢ã¯å¼¾ããã
ã¡ãªã¿ã«åã¯ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ãã§å¼¾ãã®ãå§ãã¾ããä¸çªæ軽ã§ãããããã ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ãå½è£
ããããããã¼ãã§ããã©ã
ã¾ãæºå¸¯ããå½è£
ããããã¨ãæ»
å¤ã«ã¯ãªãã®ã§å¤§ä¸å¤«ãã¨ã