wwwãã¬ãã£ãã¯ã¹ãæã€ãã¡ã€ã³ããããŸãã¯Apacheã¬ãã«ã®.htaccessã§ãã¡ã€ã³ã«301ãæ£ãã転éã§ããŸããïŒ
æåŸã®è³ªåã«ã€ããŠã¯ããŸã 解決çãæäŸã§ããŸããã ãã®çç±ã¯ãHTTP / 1.1ãããã³ã«ã§ããããã¯ããèªè»¢è»ãçºæãããïŒãµã€ãã®ã³ã¢ãäœæããïŒãšãã«ããã詳现ã«èª¿æ»ããå¿ èŠããããŸããã
ãHostïŒããªã¯ãšã¹ãã®HTTPããããŒããã¹ãŠã§ãã ç¹å®ã®æ¡ä»¶äžã§ã¯ãäœã§ãããã«ããå¯èœæ§ãããããµãŒããŒã¯HTTP / 1.1ã«åŸã£ãŠå®å šã«ç¡èŠããå¿ èŠããããŸãã ã»ãšãã©ã®éçºè ã¯ãSEOæé©åãªã©ã«ãã®ãã£ãŒã«ãã®å€ã䜿çšããŸãã ä»åŸãè¿œå ã®ãããã·ïŒããšãã°ãnginxïŒããã®åé¡ã解決ãããšèšããŸãã
ãµãŒããŒã®äžæ£ãªåäœã説æããããã«ãHabr瀟ã®ãµã€ããå埩åŠçããããšã«ããŸããã ããŒã¹ã®ãµã€ãã§ã¯ã圌ã¯æåã§ãããè¡ãããã®åŸãäžéšã®ãµã€ãã誀ã£ãèŠæ±ã«ãæ£ãããå¿çããããšãçºèŠããŸããã ãã®åŸãå°ããªãã¹ããŠãŒãã£ãªãã£ãäœæããããã¹ããããã¹ããã¿ãŒã³ãšãµã€ãã®æ°ãå¢ããããšãã§ããŸããã
HTTP / 1.1ã§REQUEST_URIãé ããã®ã¯äœã§ããïŒ
çè«
HTTP / 1.0
HTTP / 1.0ãããã³ã«ããå§ããŸããããã¯ãRfC1945 www.w3.org/Protocols/rfc1945/rfc1945ã§èª¬æãããŠããã1996幎5æã®æ¥ä»ã§ãã ç®çã®ããŒãžãååŸããã«ã¯ããµãŒããŒã«æ¥ç¶ããŠ1è¡éä¿¡ããã ãã§ååã§ãã
GET /path/to/resource.html HTTP / 1.0
ãããã·ãµãŒããŒã«ã¢ã¯ã»ã¹ãããšãã¯ã絶察ãã¹ã§ã¯ãªããå®å šãªã¢ãã¬ã¹ã䜿çšããå¿ èŠããããŸããã
GET http://domain.name/path/to/resource.html HTTP / 1.0
ããã¯ãã¹ãŠã»ã¯ã·ã§ã³5.1.2ãRequest-URIãã§èª¬æãããŠããŸãã
ãã¹ãã®å€èŠ³
1ã€ã®ãµãŒããŒãäžåºŠã«è€æ°ã®ãã¡ã€ã³åãæäŸã§ããããã«ããããã«ããããã³ã«äœæè ã¯ãã¢ã¯ã»ã¹ããããã¡ã€ã³ãå«ããHostïŒããªã¯ãšã¹ãããããŒãè¿œå ããŸããã ãã®ããããŒã¯HTTP / 1.0æšæºã®äžéšã§ã¯ãããŸããããäžéšã®ãµãŒããŒããã³ã¯ã©ã€ã¢ã³ãã§ãµããŒããããããã«ãªããŸããã ããšãã°ãwgetã¯HTTP / 1.0ãä»ããŠãªã¯ãšã¹ããéä¿¡ããŸããããHostïŒããè¿œå ããŸãã
HTTP / 1.1
1999幎6æïŒ14幎åïŒã«HTTP / 1.1ãããã³ã«ãç»å ŽããŸãããããã¯ãRfC2616 www.w3.org/Protocols/rfc2616/rfc2616.htmlã§èª¬æãããŠããŸã ã ã»ã¯ã·ã§ã³14.23ã§ãæ°ãããããã³ã«ã§ã¯ãåãªã¯ãšã¹ãããããŒã«ããã¹ãããã£ãŒã«ããå«ããå¿ èŠããããŸããã
ã¯ã©ã€ã¢ã³ãã¯ããã¹ãŠã®HTTP / 1.1èŠæ±ã¡ãã»ãŒãžã«HostããããŒãã£ãŒã«ããå«ããå¿ èŠããããŸãã èŠæ±ãããURIã«ãèŠæ±ãããŠãããµãŒãã¹ã®ã€ã³ã¿ãŒããããã¹ãåãå«ãŸããŠããªãå ŽåãHostããããŒãã£ãŒã«ãã«ã¯ç©ºã®å€ãæå®ããå¿ èŠããããŸãã
ããã«ãã¯ãšãªæååããRequest-URIã«å€§å¹ ãªå€æŽãå ããããŸããïŒ ã»ã¯ã·ã§ã³5.1.2 ïŒã åã®ãããã³ã«ãšåæ§ã«ããããã·ãµãŒããŒãžã®èŠæ±ã«ã¯å®å šãªã¢ãã¬ã¹ãå¿ èŠã§ãïŒãèŠæ±ããããã·ã«å¯ŸããŠè¡ãããå ŽåãabsoluteURIãã©ãŒã ãå¿ èŠã§ãããïŒã ãã ãããã¹ãŠã®ãµãŒããŒã¯ãã®ãããªãªã¯ãšã¹ãã«å¿çããå¿ èŠããããŸãããã¯ã©ã€ã¢ã³ãã¯ãããã·ãµãŒããŒã«å¯ŸããŠã®ã¿ãã®ãããªãªã¯ãšã¹ããçºè¡ããŸãã
HTTPã®å°æ¥ã®ããŒãžã§ã³ã®ãã¹ãŠã®ãªã¯ãšã¹ãã§çµ¶å¯ŸURIãžã®ç§»è¡ãå¯èœã«ããã«ã¯ãHTTP / 1.1ã¯ã©ã€ã¢ã³ãããããã·ãžã®ãªã¯ãšã¹ãã§ã®ã¿çæããå Žåã§ãããã¹ãŠã®HTTP / 1.1ãµãŒããŒã¯ãªã¯ãšã¹ãã§çµ¶å¯ŸURIãã©ãŒã ãåãå ¥ããªããã°ãªããŸããã
å®å šãªã¢ãã¬ã¹ïŒããšãã°ã http ïŒ //www.w3.org/pub/WWW/TheProject.html ïŒã«ç§»åããããšã«ãªã£ãŠããããšã«æ³šæããŠãã ããããããã£ãŠ ãã¯ã©ã€ã¢ã³ãã¯çµ¶å¯Ÿãã¹ïŒabs_pathãªã©ã / pubãªã©ïŒã®ã¿ã䜿çšããå¿ èŠã¯ãããŸããã /WWW/TheProject.html ïŒã ããã«ããµãŒããŒã¯ã¯ã©ã€ã¢ã³ãããã®èŠæ±ã«çµ¶å¯ŸURIã§å¿çããæ©èœãæ瀺çã«å¿ èŠãšããŸãããããã£ãŠããã®å Žåãã¯ã©ã€ã¢ã³ãã®èŠæ±ãæ£ãããªããšããç°è°ã¯ããã¯ã©ã€ã¢ã³ãã¯åžžã«æ£ããããããããã«é€å€ããŸãã
HTTP / 1.1ã®ãã¹ã
Request-URIã®å€æŽã¯ç¡å®³ã«èŠãããããããŸãããã ã»ã¯ã·ã§ã³5.2ã«ã¯1ã€ã®éèŠãªèŠä»¶ãå«ãŸããŠããŸãããRequest-URIãabsoluteURIã§ããå Žåããã¹ãã¯Request-URIã®äžéšã§ãã èŠæ±å ã®HostããããŒãã£ãŒã«ãã®å€ã¯ç¡èŠããå¿ èŠããããŸããâã€ãŸããèŠæ±ã®è§£é
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒanytext
èŠæ±ã«äžèŽããå¿ èŠããããŸã
GET /path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
absoluteURIã§ã¯ãšãªãå®è¡ãããšãã«ãHostïŒããç¡èŠããŸããïŒ
ïŒ {REQUEST_URI}ããã³$ _SERVER ["REQUEST_URI"]
mod_rewriteã®ããã¥ã¡ã³ãã«ã¯ã次ã®ããšãèšèŒãããŠããŸãã
THE_REQUEST
ãã©ãŠã¶ãããµãŒããŒã«éä¿¡ãããå®å šãªHTTPãªã¯ãšã¹ãè¡ïŒäŸïŒãGET /index.html HTTP / 1.1ãïŒã ããã«ã¯ããã©ãŠã¶ããéä¿¡ãããè¿œå ã®ããããŒã¯å«ãŸããŸããã ãã®å€ã¯ã以äžã®ä»ã®ã»ãšãã©ã®å€æ°ãšã¯ç°ãªãããšã¹ã±ãŒããããŠããŸããïŒãã³ãŒããããŠããŸããïŒã
REQUEST_URI
ã/index.htmlããªã©ãèŠæ±ãããURIã®ãã¹ã³ã³ããŒãã³ãã ããã¯ãQUERY_STRINGãšããååã®ç¬èªã®å€æ°ãšããŠäœ¿çšå¯èœãªã¯ãšãªæååãç¹ã«é€å€ããŸãã
ã€ãŸããïŒ {REQUEST_URI}ã«ã¯åžžã«çµ¶å¯Ÿãã¹ããããå®å šãªã¢ãã¬ã¹ã¯ãããŸããã
ãŠãŒã¶ãŒã次ã®ãªã¯ãšã¹ããéä¿¡ããå Žåãmod_rewriteã䜿çšããã«ãã¡ã€ã³ã«ãwwwããè¿œå ããæšæºSEOã¿ã¹ã¯ãè©ŠããŠãã ããã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒwww.domain.name
èšäºã®åé ã§ãApache mod_rewriteã®ïŒ {REQUEST_URI}ãšPHPã®$ _SERVER ["REQUEST_URI"]ã®éãã«ã€ããŠå°ããã®ã§ãPHPã®ããã¥ã¡ã³ãããã®æç²ã瀺ããŸã ã
REQUEST_URI
ãã®ããŒãžã«ã¢ã¯ã»ã¹ããããã«æå®ãããURIã ããšãã°ãã/ index.htmlãã
ã©ããã§èšå®ã§ããŸãããç§ã«ãšã£ãŠã¯ãPHP / 5.3.13ã¯å®å šãªã¢ãã¬ã¹ã§èŠæ±ããããšãã«absoluteURIãè¿ããŸãã
ç·Žç¿ãã
å®ãµãŒããŒã«ã¯ãšãªãå®è¡ãããšã©ããªãããèããŠã¿ãŸãããã Webãµã€ãã®ã¢ãã¬ã¹ã¯ã Habra瀟ã®ããŒãžããååŸããŸããïŒãªã¹ãã¯ããã«å€æŽãããŸããå é±ã®çµããã«ååŸããŸããïŒã Node.JSã§å°ããªã¹ã¯ãªãããã¹ã±ããããŸãããhttp_checké¢æ°ã¯åäžã®ãªã¯ãšã¹ããéä¿¡ããfull_http_checkã¯ç¹å®ã®ãã³ãã¬ãŒãã«åŸã£ãŠç¹å®ã®ãµãŒããŒã«è€æ°ã®ãªã¯ãšã¹ããçæããŸãã
ã¹ã¯ãªããã³ãŒã
var net = require('net'); var default_result = function(title) { if (title) { return {'title': 'title', 'step': 'step', 'host': 'host', 'request': 'request', 'header': 'header', 'full_response': 'full_response', 'response': 'response', 'server': 'server', 'length': 'length', 'location': 'location', 'error': 'error'}; } else { return {'title': '', 'step': '', 'host': '', 'request': '', 'header': '', 'full_response': '', 'response': '', 'server': '', 'length': '', 'location': '', 'error': ''}; } }; var format_result = function(result) { return '' + result['title'].toString() + '\t' + result['step'] + '\t' + result['host'] + '\t' + result['request'].toString() + '\t' + result['header'].toString() + '\t' + result['response'].toString() + '\t' + result['server'].toString() + '\t' + result['length'].toString() + '\t' + result['error'].toString() + '\t' + result['location'].toString() + '\t' + result['full_response'].toString(); }; var http_check = function(title, step, host, req, host_hdr) { var host_header = host_hdr || ''; var result = default_result(false); result['title'] = title; result['step'] = step; result['host'] = host; result['request'] = req; result['header'] = host_header; var dat = ''; var client = net.connect({port: 80, host: host}, function() { //'connect' listener client.on('data', function (data) { dat = dat + data; var lines = dat.toString().split('\r\n'); result['full_response'] = JSON.stringify(dat.toString().split('\r\n\r\n')[0]); result['response'] = lines[0] || false; if (lines[0].substring(0, 5) == 'HTTP/') { var i = 1; while (lines[i] != '') { var title = lines[i].match(/^([^:]+:)\s(.+)$/); if (title[1] == 'Location:') { result['location'] = title[2]; } else if (title[1] == 'Server:') { result['server'] = title[2]; } else if (title[1] == 'Content-Length:') { result['length'] = title[2]; } i++; } if (dat.indexOf('\r\n\r\n') >= 0) { client.end(); client.destroy(); } } else { client.end(); client.destroy(); } }); client.on('end', function () { console.log('client disconnected'); }); client.on('error', function (error) { console.log('ERROR: ' + error.toString()); }); client.on('timeout', function () { console.log('Timeout'); }); client.on('close', function (had_error) { result['error'] = result['error'] || had_error || ''; console.log(format_result(result)); }); client.write(req + '\r\n'); host_hdr && client.write('Host: ' + host_hdr + '\r\n'); client.write('\r\n'); }); }; var full_http_check = function(title, url) { var parts = url.match(/^http:\/\/([^\/]+)(.+)$/); // 1 // GET /path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '01', parts[1], 'GET ' + parts[2] + ' HTTP/1.1', parts[1]); // 2 // GET http://domain.name/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '02', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.1', parts[1]); // 3 // GET /path/to/resource.html HTTP/1.0 http_check(title, '03', parts[1], 'GET ' + parts[2] + ' HTTP/1.0', ''); // 4 // GET /path/to/resource.html HTTP/1.0 // Host: domain.name http_check(title, '04', parts[1], 'GET ' + parts[2] + ' HTTP/1.0', parts[1]); // 5 // GET http://domain.name/path/to/resource.html HTTP/1.0 http_check(title, '05', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.0', ''); // 6 // GET http://domain.name/path/to/resource.html HTTP/1.0 // Host: domain.name http_check(title, '06', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.0', parts[1]); // 7 // GET http://domain.name/path/to/resource.html HTTP/1.1 // Host: void.domain.name http_check(title, '07', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.1', 'void.' + parts[1]); // 8 // GET http://domain.name/path/to/resource.html HTTP/1.1 // Host: local.fake http_check(title, '08', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.1', 'local.fake'); // 9 // GET http://domain.name/path/to/resource.html HTTP/1.1 // Host: l-IjFN=fiG(w+J2p:#.{92!m`d^? http_check(title, '09', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.1', 'l-IjFN=fiG(w+J2p:#.{92!m`d^?'); // 10 // GET http://fake.domain.name/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '10', parts[1], 'GET http://fake.' + parts[1] + parts[2] + ' HTTP/1.1', parts[1]); // 11 // GET http://local.fake/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '11', parts[1], 'GET http://local.fake' + parts[2] + ' HTTP/1.1', parts[1]); // 12 // GET http://l-IjFN=fiG(w+J2p:#.{92!m`d^?/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '12', parts[1], 'GET http://l-IjFN=fiG(w+J2p:#.{92!m`d^?' + parts[2] + ' HTTP/1.1', parts[1]); // 13 // GET http://local.fake/path/to/resource.html HTTP/1.1 // Host: void.domain.name http_check(title, '13', parts[1], 'GET http://local.fake' + parts[2] + ' HTTP/1.1', 'void.' + parts[1]); // 14 // GET habr://domain.name/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '14', parts[1], 'GET habr://' + parts[1] + parts[2] + ' HTTP/1.1', parts[1]); // 15 // GET habr://void.domain.name/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '15', parts[1], 'GET habr://void.' + parts[1] + parts[2] + ' HTTP/1.1', parts[1]); // 16 // GET habr://local.fake/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '16', parts[1], 'GET habr://local.fake' + parts[2] + ' HTTP/1.1', parts[1]); // 17 // GET habr://l-IjFN=fiG(w+J2p:#.{92!m`d^?/path/to/resource.html HTTP/1.1 // Host: domain.name http_check(title, '17', parts[1], 'GET habr://l-IjFN=fiG(w+J2p:#.{92!m`d^?' + parts[2] + ' HTTP/1.1', parts[1]); // 18 // GET habr://l-IjFN=fiG(w+J2p:#.{92!m`d^?/path/to/resource.html HTTP/1.1 // Host: local.fake http_check(title, '18', parts[1], 'GET habr://l-IjFN=fiG(w+J2p:#.{92!m`d^?' + parts[2] + ' HTTP/1.1', 'local.fake'); }; console.log(format_result(default_result(true))); /* http_check('IBM Fake', 'www.ibm.com', 'GET ttp://com/midmarket/ru/ru/ HTTP/1.1', 'ibm'); full_http_check('IBM', 'http://www.ibm.com/midmarket/ru/ru/'); */ full_http_check('', 'http://company.yandex.ru/about/main/'); full_http_check('JetBrains', 'http://www.jetbrains.com/products.html'); full_http_check('Box Overview', 'http://7del.net/texts/galaxy-note.html'); full_http_check('KolibriOS Project Team', 'http://kolibrios.org/en/download.htm'); full_http_check('Opera Software ASA', 'http://www.opera.com/about'); full_http_check('Apps4All', 'http://apps4all.ru/news/apple/apple-ios-7-beta.html'); full_http_check('', 'http://nordavind.ru/node/207'); full_http_check('Mail.Ru Group', 'http://corp.mail.ru/about/'); full_http_check('Microsoft', 'http://windows.microsoft.com/ru-RU/windows/home'); full_http_check('Zfort Group', 'http://www.zfort.com.ua/company/about/'); full_http_check('IBM', 'http://www.ibm.com/contact/ru/ru/'); full_http_check('UIDG', 'http://uidesign.ru/about/'); full_http_check('Intel', 'http://www.intel.ru/content/www/ru/ru/company-overview/company-overview.html'); full_http_check('Rusonyx', 'http://www.rusonyx.ru/company/reasons/'); full_http_check('', 'http://www.mosigra.ru/page/about/'); full_http_check('DevConf', 'http://devconf.ru/about/'); full_http_check('e-Legion Ltd.', 'http://www.e-legion.ru/contacts/'); full_http_check('Badoo', 'http://corp.badoo.com/company/'); full_http_check(' ()', 'http://mobile.beeline.ru/msk/setup/index.wbp');
次ã«ãåãã³ãã¬ãŒããšãµã€ãã®åå¿ã詳ããèŠãŠã¿ãŸãããã
ãªã¯ãšã¹ã1
絶察ãã¹ãšæ£ããHostããããŒãå«ããæãäžè¬çãªHTTP / 1.1èŠæ±ãªãã·ã§ã³ã ã©ã®ãµãŒããŒãæ£ããå¿çããå¿ èŠããããŸããã€ãŸãããHTTP / 1.1 200 OKããåŸ ã£ãŠããŸãã
GET /path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ãã¹ãŠã®ãµãŒããŒããHTTP / 1.1 200 OKããè¿ããŸããã 以äžã¯ãããµãŒããŒãå¿çããããŒã®å€ã®è¡šã§ãã
äŒç€Ÿ | ãµãŒããŒèŠåºãïŒ |
---|---|
Apps4All | nginx / 1.0.15 |
ããã¥ãŒ | nginx |
ããã¯ã¹ã®æŠèŠ | nginx / 1.2.1 |
Devconf | nginx / 1.0.15 |
e-Legion Ltd. | nginx / 1.0.5 |
Ibm | IBM_HTTP_Server |
Intel | Microsoft-IIS / 7.5 |
ãžã§ãããã¬ã€ã³ | nginx |
KolibriOSãããžã§ã¯ãããŒã | lighttpd / 1.4.32 |
Mail.Ruã°ã«ãŒã | nginx / 1.2.5 |
ãã€ã¯ããœãã | Microsoft-IIS / 7.5 |
Opera Software ASA | nginx |
ã«ãœããã¯ã¹ | nginx |
UIDG | ã¢ããã |
Zfortã°ã«ãŒã | nginx / 1.4.1 |
VimpelComïŒããŒã©ã€ã³ïŒ | Microsoft-IIS / 7.5 |
ã¢ã·ã°ã© | nginx / 1.4.1 |
ãã«ããã³ã | nginx / 1.0.4 |
ã€ã³ããã¯ã¹ | nginx / 1.2.1 |
ãªã¯ãšã¹ã2
æåã®ã¿ã€ãã®ãªã¯ãšã¹ãã®ããªã¢ã³ãã§ããã絶察ãã¹ã§ã¯ãªããå®å šãªã¢ãã¬ã¹ãæå®ããŸãã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ãã®ãªã¯ãšã¹ãã«å¿ããŠããã¹ãŠã®ãµãŒããŒãåã³å šäŒäžèŽã瀺ããŸããã ãã©ã€ããã¯ãåãµãŒããŒã解ææ¹æ³ãç¥ã£ãŠããããšãèŠæ±ããŸãã
ãªã¯ãšã¹ã3
ãHostïŒããªãã®çµ¶å¯Ÿãã¹ã§ã®HTTP / 1.0ã®ãªã¯ãšã¹ãã ãHTTP / 1.0 200 OKããååŸããå¿ èŠããããŸãã
GET /path/to/resource.html HTTP / 1.0
3çªç®ã®èŠæ±ã§ããµãŒããŒã¯ãã·ã£ã¯ãŒãã济ã³ãŸããã ãŸããåäžã®HTTP / 1.0 200 OKå¿çã¯ãããŸããã
äŒç€Ÿ | ãµãŒããŒå¿ç |
---|---|
Apps4All | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ããã¥ãŒ | HTTP / 1.1 302ãäžæçã«ç§»åããŸãã |
ããã¯ã¹ã®æŠèŠ | HTTP / 1.1 200 OK |
Devconf | HTTP / 1.1 404ãèŠã€ãããŸãã |
e-Legion Ltd. | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Ibm | HTTP / 1.1 200 OK |
Intel | HTTP / 1.0 400äžæ£ãªãªã¯ãšã¹ã |
ãžã§ãããã¬ã€ã³ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.0 404ãèŠã€ãããŸãã |
Mail.Ruã°ã«ãŒã | HTTP / 1.1 200 OK |
ãã€ã¯ããœãã | HTTP / 1.1 200 OK |
Opera Software ASA | HTTP / 1.1 404ãèŠã€ãããŸãã |
ã«ãœããã¯ã¹ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
UIDG | HTTP / 1.1 404ãèŠã€ãããŸãã |
Zfortã°ã«ãŒã | HTTP / 1.1 404ãèŠã€ãããŸãã |
VimpelComïŒããŒã©ã€ã³ïŒ | HTTP / 1.1 302ãªãã€ã¬ã¯ã |
ã¢ã·ã°ã© | HTTP / 1.1 404ãèŠã€ãããŸãã |
ãã«ããã³ã | HTTP / 1.1 200 OK |
ã€ã³ããã¯ã¹ | HTTP / 1.1 404ãèŠã€ãããŸãã |
ãªã¯ãšã¹ã4
åã®ãªã¯ãšã¹ãã§ããããHostïŒããè¿œå ããŸãã æåã®ãªã¯ãšã¹ããšã¯ãããã³ã«ããŒãžã§ã³ã®ã¿ãç°ãªããŸãã
GET /path/to/resource.html HTTP / 1.0 ãã¹ãïŒdomain.name
ãã¹ãã¯ãµãŒããŒäžã§éåžžã«ååãã«è¡åããŸãã-誰ããã200 OKãã®å¿çãè¿ããŸããããHTTP / 1.0ãæã£ãŠããã®ã¯IntelãšKolibriOSãããžã§ã¯ãããŒã ã®ã¿ã§ããã
ãªã¯ãšã¹ã5
ããã¹ãïŒããªãã®å®å šãªã¢ãã¬ã¹ãæã€HTTP / 1.0ã®èŠæ±ã ãHTTP / 1.0 200 OKããèªããšããã§ãããã
GET http://domain.name/path/to/resource.html HTTP / 1.0
ãã®å³ã¯ãåã®ã¯ãšãªã®çµæãšå®å šã«äžèŽããŠããŸãããe-Legion Ltd. ãHTTP / 1.1 500å éšãµãŒããŒãšã©ãŒããçºè¡ãããŸããã
ãªã¯ãšã¹ã6
åã®ãªã¯ãšã¹ãã§ããããHostïŒããè¿œå ããŸãã 2çªç®ã®èŠæ±ãšç°ãªãã®ã¯ããããã³ã«ããŒãžã§ã³ã®ã¿ã§ãã
GET http://domain.name/path/to/resource.html HTTP / 1.0 ãã¹ãïŒdomain.name
çµæã¯4çªç®ã®ã¯ãšãªãšå®å šã«äžèŽããŸããã€ãŸãããHostïŒãã¯e-Legion Ltd.ãµãŒããŒã®å éšãšã©ãŒãä¿®æ£ããŸããã
ãªã¯ãšã¹ã7
å®å šãªã¢ãã¬ã¹ãæã€2çªç®ã®ãªã¯ãšã¹ãã®ããªã¢ã³ãã§ããããHostïŒãã«ã¯ååšããªããµããã¡ã€ã³ãèšè¿°ããŸãã èŠæ±ã¯å®å šã«æ£ããããããµãŒããŒã¯ãHTTP / 1.1 200 OKãã§å¿çããå¿ èŠããããŸãã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒvoid.domain.name
ãªã¯ãšã¹ã8
ããã§ããHostïŒããšããŠãååšããªããã¡ã€ã³ãæå®ããŸãã ãªã¯ãšã¹ãå ã§äœãå€æŽãããŠããŸããããäžéšã®ãµãŒããŒã¯ãããæ°ã«å ¥ããªããããããŸããã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒlocal.fake
ãªã¯ãšã¹ã9
ãHostïŒãããããŒã¯å®å šã«ç¡èŠããå¿ èŠããããããå€ãã®ãã¹ã¯ãŒãããããããããªä»»æã®ããã¹ããèšè¿°ããŸãã æšæºã«åŸã£ãŠããHTTP / 1.1 200 OKããæåŸ ãããŸãã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒl-IjFN = fiGïŒw + J2pïŒïŒã{92ïŒM`d ^ïŒ
ãµãŒããŒ7-9ã¯ã次ã®ããã«ãªã¯ãšã¹ãã«çããå¿çããŸããã
äŒç€Ÿ | ãµãŒããŒå¿ç | ãµãŒããŒèŠåºãïŒ |
---|---|---|
Apps4All | HTTP / 1.1 200 OK | nginx / 1.0.15 |
ããã¥ãŒ | HTTP / 1.1 200 OK | nginx |
ããã¯ã¹ã®æŠèŠ | HTTP / 1.1 200 OK | nginx / 1.2.1 |
Devconf | HTTP / 1.1 500å éšãµãŒããŒãšã©ãŒ | nginx / 1.0.15 |
e-Legion Ltd. | HTTP / 1.1 500å éšãµãŒããŒãšã©ãŒ | nginx / 1.0.5 |
Ibm | HTTP / 1.1 200 OK | IBM_HTTP_Server |
Intel | HTTP / 1.0 400äžæ£ãªãªã¯ãšã¹ã | AkamaiGHost |
ãžã§ãããã¬ã€ã³ | HTTP / 1.1 200 OK | nginx |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.1 200 OK | lighttpd / 1.4.32 |
Mail.Ruã°ã«ãŒã | HTTP / 1.1 200 OK | nginx / 1.2.5 |
ãã€ã¯ããœãã | HTTP / 1.1 200 OK | Microsoft-IIS / 7.5 |
Opera Software ASA | HTTP / 1.1 200 OK | nginx |
ã«ãœããã¯ã¹ | HTTP / 1.1 200 OK | nginx |
UIDG | HTTP / 1.1 200 OK | ã¢ããã |
Zfortã°ã«ãŒã | HTTP / 1.1 200 OK | nginx / 1.4.1 |
VimpelComïŒããŒã©ã€ã³ïŒ | HTTP / 1.1 200 OK | Microsoft-IIS / 7.5 |
ã¢ã·ã°ã© | HTTP / 1.1 200 OK | nginx / 1.4.1 |
ãã«ããã³ã | HTTP / 1.1 200 OK | nginx / 1.0.4 |
ã€ã³ããã¯ã¹ | HTTP / 1.1 200 OK | nginx / 1.2.1 |
ãªã¯ãšã¹ã10
ééã£ããªã¯ãšã¹ãã®æåã æ£ãããHostïŒããéä¿¡ããŸãããå®å šãªã¢ãã¬ã¹ã«ååšããªããµããã¡ã€ã³ãè¿œå ããŸãã
GET http://fake.domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ãšã©ãŒã®ããã¯ãšãªãéå§ãããã®ã§ãçµæã¯æããããããŸããã
äŒç€Ÿ | ãµãŒããŒå¿ç |
---|---|
Apps4All | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ããã¥ãŒ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ããã¯ã¹ã®æŠèŠ | HTTP / 1.1 200 OK |
Devconf | HTTP / 1.1 404ãèŠã€ãããŸãã |
e-Legion Ltd. | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Ibm | HTTP / 1.1 200 OK |
Intel | HTTP / 1.1 200 OK |
ãžã§ãããã¬ã€ã³ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.1 404ãèŠã€ãããŸãã |
Mail.Ruã°ã«ãŒã | HTTP / 1.1 200 OK |
ãã€ã¯ããœãã | HTTP / 1.1 200 OK |
Opera Software ASA | HTTP / 1.1 404ãèŠã€ãããŸãã |
ã«ãœããã¯ã¹ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
UIDG | HTTP / 1.1 404ãèŠã€ãããŸãã |
Zfortã°ã«ãŒã | HTTP / 1.1 404ãèŠã€ãããŸãã |
VimpelComïŒããŒã©ã€ã³ïŒ | HTTP / 1.1 302ãªãã€ã¬ã¯ã |
ã¢ã·ã°ã© | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ãã«ããã³ã | HTTP / 1.1 200 OK |
ã€ã³ããã¯ã¹ | HTTP / 1.1 404ãèŠã€ãããŸãã |
ãµãŒããŒã®ã»ãŒ3åã®1ã¯ãæ£ãããã¹ïŒãªãã€ã¬ã¯ãïŒãææ¡ããããšããŠæéãç¡é§ã«ããŸããã§ããã æ®å¿µãªãããå€ãã®ãµãŒããŒã¯åã«ã¡ã€ã³ããŒãžã«ãªãã€ã¬ã¯ãããŸãã
ãªã¯ãšã¹ã11
次ã«ãååšããªããã¡ã€ã³ãéä¿¡ããŠã¿ãŸãã
GET httpïŒ//local.fake/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ããã§ã®çµæã¯ä»¥åã®ãªã¯ãšã¹ããšå®å šã«äžèŽããŠããŸãããMosigraã§ã¯ãªããHTTP / 1.1 301 Moved Permanentlyããæ¢ã«ãHTTP / 1.1 404 Not Foundããçºè¡ããŠããŸãã
ãªã¯ãšã¹ã12
ããããä»»æã®ããã¹ãã¯ãã¡ã€ã³ãšããŠãŸã£ããæ©èœããŸããïŒ
GET httpïŒ// l-IjFN = fiGïŒw + J2pïŒïŒã{92ïŒM`d ^ïŒ/ãã¹/ to / resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
å¿çãHTTP / 1.1 200 OKãã¯ãIntelããã³Opera Software ASAããéä¿¡ãããŸããã IBMãšMosigraã¯HTTP / 1.1 404 Not Foundãè¿ããŸããã ä»ã®äººã¯ãã¹ãŠãããããŒã®ãªãéšåïŒHTTP / 1.0ã§å¯èœãªãªãã·ã§ã³ïŒã§404 Bad RequestãæžããŸããã
ãªã¯ãšã¹ã13
11çªç®ã®ãªã¯ãšã¹ãã®ã³ããŒã§ããããHostïŒããšããŠãµããã¡ã€ã³ããããŸãã ä»ã®èª€ã£ãçµã¿åããããã§ãã¯ããããšã¯ã»ãšãã©æå³ããããŸããã
GET httpïŒ//local.fake/path/to/resource.html HTTP / 1.1 ãã¹ãïŒvoid.domain.name
çµæã¯ãªã¯ãšã¹ã11ã®ã³ããŒã«ããªããŸããããIntelã¯éäŒããŠãHTTP / 1.0 400 Bad Requestããè¿ããŸããã
ãªã¯ãšã¹ã14
2çªç®ã®èŠæ±ããã ããå®å šãªã¢ãã¬ã¹ãæå®ãããšãã«ååšããªããããã³ã«ã䜿çšããŸãã ééãããã§ã«ããã«éããããŸããã
GET habrïŒ//domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ããªãã®æ°ã®ãµã€ããHABRãããã³ã«ãåãå ¥ããŠããããšãå€æããŸããã
äŒç€Ÿ | ãµãŒããŒå¿ç |
---|---|
Apps4All | HTTP / 1.1 200 OK |
ããã¥ãŒ | HTTP / 1.1 200 OK |
ããã¯ã¹ã®æŠèŠ | HTTP / 1.1 200 OK |
Devconf | HTTP / 1.1 200 OK |
e-Legion Ltd. | HTTP / 1.1 200 OK |
Ibm | HTTP / 1.1 200 OK |
Intel | HTTP / 1.0 400äžæ£ãªãªã¯ãšã¹ã |
ãžã§ãããã¬ã€ã³ | HTTP / 1.1 200 OK |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Mail.Ruã°ã«ãŒã | HTTP / 1.1 200 OK |
ãã€ã¯ããœãã | HTTP / 1.1 400ã®æªããªã¯ãšã¹ã |
Opera Software ASA | HTTP / 1.1 400 BAD_REQUEST |
ã«ãœããã¯ã¹ | HTTP / 1.1 200 OK |
UIDG | HTTP / 1.1 200 OK |
Zfortã°ã«ãŒã | HTTP / 1.1 200 OK |
VimpelComïŒããŒã©ã€ã³ïŒ | HTTP / 1.1 400ã®æªããªã¯ãšã¹ã |
ã¢ã·ã°ã© | HTTP / 1.1 400 BAD_REQUEST |
ãã«ããã³ã | HTTP / 1.1 200 OK |
ã€ã³ããã¯ã¹ | HTTP / 1.1 200 OK |
ãªã¯ãšã¹ã15
æçµçã«ãµãŒããŒã®æµæãæã¡ç Žããåã®ãªã¯ãšã¹ããéä¿¡ããããšããŸããããµããã¡ã€ã³ã¯ééã£ãŠããŸãã
GET habrïŒ//void.domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
çµæã¯10çªç®ã®ã¯ãšãªã«äŒŒãŠããŸãããå€æŽç¹ããããŸãã
äŒç€Ÿ | ãªã¯ãšã¹ã10 | ãªã¯ãšã¹ã15 |
---|---|---|
Apps4All | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ããã¥ãŒ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
ããã¯ã¹ã®æŠèŠ | HTTP / 1.1 200 OK | HTTP / 1.1 200 OK |
Devconf | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 404ãèŠã€ãããŸãã |
e-Legion Ltd. | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Ibm | HTTP / 1.1 200 OK | HTTP / 1.1 200 OK |
Intel | HTTP / 1.1 200 OK | HTTP / 1.0 400äžæ£ãªãªã¯ãšã¹ã |
ãžã§ãããã¬ã€ã³ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Mail.Ruã°ã«ãŒã | HTTP / 1.1 200 OK | HTTP / 1.1 200 OK |
ãã€ã¯ããœãã | HTTP / 1.1 200 OK | HTTP / 1.1 400ã®æªããªã¯ãšã¹ã |
Opera Software ASA | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 400 BAD_REQUEST |
ã«ãœããã¯ã¹ | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
UIDG | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 404ãèŠã€ãããŸãã |
Zfortã°ã«ãŒã | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 404ãèŠã€ãããŸãã |
VimpelComïŒããŒã©ã€ã³ïŒ | HTTP / 1.1 302ãªãã€ã¬ã¯ã | HTTP / 1.1 400ã®æªããªã¯ãšã¹ã |
ã¢ã·ã°ã© | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã | HTTP / 1.1 400 BAD_REQUEST |
ãã«ããã³ã | HTTP / 1.1 200 OK | HTTP / 1.1 200 OK |
ã€ã³ããã¯ã¹ | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 404ãèŠã€ãããŸãã |
ãªã¯ãšã¹ã16
ä»»æã®ãã¡ã€ã³ã䜿çšããŠã¿ãŸãããã
GET habrïŒ//local.fake/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
çµæã¯åã®ã¯ãšãªãšäžèŽããŸããã
ãªã¯ãšã¹ã17
ãããŠã3åç®ã¯ããã¡ã€ã³ãä»»æã®ããã¹ãã«çœ®ãæããããšããŸãã
GET habrïŒ// l-IjFN = fiGïŒw + J2pïŒïŒã{92ïŒM`d ^ïŒ/ãã¹/ to / resource.html HTTP / 1.1 ãã¹ãïŒdomain.name
ãµãŒããŒããã®åäžã®è¯å®çãªå¿çã§ã¯ãããŸããã ãªã¯ãšã¹ã12ãšæ¯èŒãããšã次ã®ãµã€ãã«å€æŽããããŸãã
äŒç€Ÿ | ãªã¯ãšã¹ã12 | ãªã¯ãšã¹ã17 |
---|---|---|
Intel | HTTP / 1.1 200 OK | HTTP / 1.0 400äžæ£ãªãªã¯ãšã¹ã |
KolibriOSãããžã§ã¯ãããŒã | HTTP / 1.1 400ã®æªããªã¯ãšã¹ã | HTTP / 1.1 301ãæ°žç¶çã«ç§»åããŸãã |
Opera Software ASA | HTTP / 1.1 200 OK | HTTP / 1.1 400 BAD_REQUEST |
ã¢ã·ã°ã© | HTTP / 1.1 404ãèŠã€ãããŸãã | HTTP / 1.1 400 BAD_REQUEST |
ãªã¯ãšã¹ã18
ã§ã¯ãæ£ãããHostïŒãããããŒãåé€ããŠã¿ãŸãããã
GET habrïŒ// l-IjFN = fiGïŒw + J2pïŒïŒã{92ïŒM`d ^ïŒ/ãã¹/ to / resource.html HTTP / 1.1 ãã¹ãïŒlocal.fake
åã®çµæãã1ã€ã ãå€æŽããããŸã-KolibriOS Project TeamãµãŒããŒã¯ããHTTP / 1.1 301 Moved Permanentlyãã§ã¯ãªããHTTP / 1.1 404 Not Foundããè¿ãå§ããŸããã
ãªã¯ãšã¹ãN
ä»ã®ã¯ãšãªãªãã·ã§ã³ãè©ŠããŠã¿ããå Žåã«æžããŠãã ããã ãããŠãããªãã¯èªåã§ãããè¡ãããšãã§ããŸãã
ãããã«
çµæã®ããã€ããèŠçŽããŠã¿ãŸãããã ã¬ãã¥ãŒãããµãŒããŒã®ã»ãŒãã¹ãŠãHTTP / 1.1ãªã¯ãšã¹ãã«æ£ããå¿çããŸããã äŸå€ã¯DevConfãe-Legion Ltdã§ããã ãšIntelã æåã®2ã€ã¯nginxã䜿çšããŠãããããåé¡ã¯ãããããã®æ§æã«ãããŸãã Intelã¯AkamaiGHostã䜿çšããŠããŸãããããã¯äžé©åã«æ§æãããŠããããHTTP / 1.1ã®ãµããŒããäžååã§ãã ãã¹ãã«æ£ããåæ Œããçç±ã®1ã€ã¯nginxïŒ19å°ã®ãµãŒããŒã®ãã¡14å°ã§äœ¿çšãããïŒã§ãããšèªããŸãã ããŒãžã§ã³ã®éãã«ãããUIDGã®nginx / 1.0.10ãšnginx / 1.4.1ã®ãã§ãŒã³ãçºèŠãããŸããã
ããªãã¯ãã¹ãŠãã·ã³ãã«ã ãšæããŸããïŒ SEOã念é ã«çœ®ããŠApacheãã»ããã¢ããããŠã¿ãŠã誀ã£ããHostïŒãã®ãªã¯ãšã¹ããæ£ããåŠçããã¯ãšãªæååã®å®å šãªã¢ãã¬ã¹ã®ã¿ã«åºã¥ããŠãã ããã
ãééã£ããæ£ããã¯ãšãªã®å®éçãªæå³ã¯äœã§ããïŒ è匱æ§ãèŠã€ããå¯èœæ§ããããšã¯æããªãã ããããå®éã«ã¯ãã»ãŒ15幎éã§ã誰ãæ£ããHTTP / 1.1ãµãŒããŒãäœæããæ¹æ³ãåŠãã§ããŸãããïŒ
PS Apache mod_rewriteã®ïŒ {REQUEST_URI}ãšPHPã®$ _SERVER ["REQUEST_URI"]ã®éããèŠããŠãããŠãã ããã
UPD1ïŒ
ãªã¯ãšã¹ã19
AEPã®ã¢ããã€ã¹ã§ã2çªç®ã®èŠæ±ãåãåããŸãããããã¹ãã«å¥ã®ãŒããã€ããšæååãè¿œå ããŸããã ããã¯ããµãŒããŒããŒããã€ãã®ãã¹ããã©ãã ãããŸãç¡èŠãããã«ããã£ãŠããŸããã
GET http://domain.name/path/to/resource.html HTTP / 1.1 ãã¹ãïŒdomain.name {zero byte} fake_and_void
次ã®ãã³ãã¬ãŒããã¹ã¯ãªããã«è¿œå ããŸããã
http_check(title, '19', parts[1], 'GET http://' + parts[1] + parts[2] + ' HTTP/1.1', parts[1] + '\0fake_and_void_text');
IBMãOpera Software ASAãããã³Mosigraãé€ãããã¹ãŠã®ãµãŒããŒããHTTP / 1.1 400 Bad Requestããè¿ããŸããã
èŠæ±ã«ãŒããã€ããè¿œå ããããšãããšãã«ãIBMãšOpera Softwareãé€ããŠãå šå¡ã400ãšã©ãŒãå ±åããŸããã