[תÔØ]ÍêÃÀ½â¾ö301Öض¨ÏòµÄÁ½ÖÖ·½·¨
±¾ÎÄÒ²ÊÇGevinÒÔǰдÔÚGevinµÄ²©¿ÍÉϵÄÎÄÕ£¬È«ÎÄÈçÏ£º
301Öض¨ÏòÕæÊǸöºÃ·½·¨°¡¡£Ç°Ò»ÆªÎÄÕÂGevinҲ˵¹ý£¬±¾²©¿Í²»ÐÒ±»»»ÓòÃûÁË¡£ÓòÃûÒ»»»£¬ÒÔÇ°ÐÁ¿à×ö²©¿ÍµÄ³É¹ûÒ²¾Í±¨·ÏÁË£¬ÍøÉϵÄÏà¹ØÁ´½ÓÒ²´ò²»¿ªÁË£¬ËÑË÷ÒýÇæµÄÊÕ¼Ҳ±¾ßÁË¡¡
ÐÒºÃÓÐ301Öض¨ÏòÄÜÓÐЧ½â¾öÕâÑùµÄÎÊÌâ¡£ÕýÈçÔ¹ⲩ¿ÍÕâƪÎÄÕÂÖÐ˵µÄ£¬301Öض¨Ïò¿É´Ù½øËÑË÷ÒýÇæÓÅ»¯Ð§¹û£¬´ÓËÑË÷ÒýÇæÓÅ»¯½Ç¶È³ö·¢£¬301Öض¨ÏòÊÇÍøÖ·Öض¨Ïò×îΪ¿ÉÐеÄÒ»ÖÖ°ì·¨¡£µ±ÍøÕ¾µÄÓòÃû·¢Éú±ä¸üºó£¬ËÑË÷ÒýÇæÖ»¶ÔÐÂÍøÖ·½øÐÐË÷Òý£¬Í¬Ê±ÓÖ»á°Ñ¾ÉµØÖ·ÏÂÔÓÐµÄ ÍⲿÁ´½ÓÈçÊýתÒƵ½ÐµØÖ·Ï£¬´Ó¶ø²»»áÈÃÍøÕ¾µÄÅÅÃûÒòΪÍøÖ·±ä¸ü¶øÊÕµ½Ë¿ºÁÓ°Ï졣ͬÑù£¬ÔÚʹÓÃ301ÓÀ¾ÃÐÔÖض¨ÏòÃüÁîÈöà¸öÓòÃûÖ¸ÏòÍøÕ¾Ö÷Óòʱ£¬Ò಻»á¶Ô ÍøÕ¾µÄÅÅÃû²úÉúÈκθºÃæÓ°Ïì¡£
¹ØÓÚ301Öض¨ÏòµÄ¸ü¶àÄÚÈÝ£¬´ó¼Ò²»·ÁGoogleһϡ£±¾ÎÄÖ»½éÉÜʵÏÖ·½·¨À²£¡
301Öض¨ÏòµÄʵÏÖ£¬ÎÒÒÔǰҲд¹ýһƪÏà¹ØµÄÎÄÕ£¬µ«ÕâƪÎÄÕµĽâ¾ö·½·¨±È½Ï¼òµ¥£¬Ö»ÄÜʵÏÖÖ÷Ò³µÄÌøת£¬±¾ÎĽéÉܵÄÕâÁ½ÖÖ·½·¨£¬¿ÉÒÔÍêÃÀʵÏÖ301Öض¨Ïò¡£
·½·¨1£ºÐÞ¸Ä.htaccessÎļþ
´úÂëÈçÏ£º
<ifmodule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} blog.iflyhigher.tk$ [NC] RewriteRule ^(.*)$ http://blog.igevin.info/$1 [R=301,L] RewriteCond %{HTTP_HOST} iflyhigher.tk$ [NC] RewriteRule ^(.*)$ http://igevin.info/$1 [R=301,L] RewriteCond %{HTTP_HOST} moiya.tk$ [NC] RewriteRule ^(.*)$ http://igevin.info/$1 [R=301,L] </ifmodule> ±¾²©ÐèÒª¶ÔÈý¸öÓòÃû½øÐÐÖض¨Ïò£¬ËùÒÔдµÄ±È½Ï¶à£¬¹Ø¼ü´úÂë¾ÍÊÇ2¾ä»°
RewriteCond %{HTTP_HOST} blog.iflyhigher.tk$ [NC] RewriteRule ^(.*)$ http://blog.igevin.info/$1 [R=301,L]ºìÉ«µÄÓòÃûÊÇÐèÒª±»Öض¨ÏòµÄ¾ÉÓòÃû£¬ÂÌÉ«µÄÊÇÏÖÔÚÍøÕ¾µÄÓòÃû¡£
·½·¨2£ºÊ¹ÓÃPHPµÄÖض¨Ïò´úÂë
н¨Ò»¸öindex.phpÎļþ£¬È»ºó²Î¿¼ÏÂÃæ´úÂë°´×Ô¼ºµÄÖض¨ÏòÒªÇó×ö¼òµ¥Ð޸ģº
<?php $the_host = $_SERVER['HTTP_HOST']; $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; switch ($the_host) { case "www.iflyhigher.tk": case "iflyhigher.tk": $location = "Location: http://igevin.info" . $request_uri; break; case "blog.iflyhigher.tk": $location = "Location: http://blog.igevin.info" . $request_uri; break; case "www.moiya.tk": case "moiya.tk": $location = "Location: http://igevin.info"; break; default: $location = "Location: http://igevin.info"; break; } header('HTTP/1.1 301 Moved Permanently'); header($location); exit(); ?>Èç¹ûÖ»Òª¶ÔÒ»¸öÓòÃû½øÐÐÖض¨Ïò£¬¿ÉÒÔ°Ñ´úÂë¼ò»¯³ÉÏÂÃæµÄÐÎʽ£º
<?php $the_host = $_SERVER['HTTP_HOST'];//È¡µÃ½øÈëËùÊäÈëµÄÓòÃû $request_uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';//ÅжϺóÃæµÄÇëÇó²¿·Ö if($the_host !== 'igevin.info')//igevin.infoÊÇÎÒÏÖÔÚµÄÓòÃû { header('HTTP/1.1 301 Moved Permanently');//·¢³ö301Í·²¿ header('Location: http://igevin.info'.$request_uri);//Ìøתµ½ÎÒµÄÐÂÓòÃûµØÖ· exit(); } ?>
×¢Ò⣬×îºóµÄexit()º¯ÊýÊÇÒ»¶¨ÒªÐ´µÄ£¬ÎÒ×î³õ¾ÍûÓÐд£¬½á¹ûÖ»ÄÜÖض¨ÏòÊ×Ò³£¬Ïñhttp://blog.iflyhigher.tk/guestbookÕâÑùµÄÍøÒ³£¬¾ÍÎÞ·¨½øÐÐÖض¨Ïò¡£
×îºó£¬¹ØÓÚÖض¨ÏòµÄһЩϸ½Ú
ÓÉÓÚÒª¶ÔÈý¸öÓòÃû½øÐÐÖض¨Ïò£¬Öض¨ÏòÇ°£¬ÎÒÊ×ÏȽ«ÕâÈý¸öÓòÃû×÷ΪAddon Domain°ó¶¨µ½ÎҵķþÎñÆ÷ÉÏÈ¥£¬²¢ÈÃÕâÈý¸öÓòÃûÖ¸Ïòͬһ¸öÎļþ¼Ð£¬ÕâÑù£¬Ö»ÒªÐÞ¸ÄÕâÒ»¸öÎļþ¼ÐÖеÄ.htaccessÎļþ»òÕßindex.phpÎļþ ¾Í¿ÉÒÔÁË¡£Èç¹ûûÓÐ.htaccessÎļþ»òÕßindex.phpÎļþ£¬Ð½¨Ò»¸ö¼´¿É¡£
Ï£Íû±¾ÎĶÔÐèÒª½øÐÐ301Öض¨ÏòµÄÅóÓÑÓаïÖú¡£
תÔØÇë±íÃ÷³ö´¦£º GevinµÄ²©¿Í, ÎÄÕ£º ÍêÃÀ½â¾ö301Öض¨ÏòµÄÁ½ÖÖ·½·¨
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ