§K¶O¦ô»ù¡A¥­­±³W¹º¡A«Ç¤º³]­p
¨t²Î³Ã­Ñ¡A©±­±³]­p¡A«ν·s¡C
²M¼ä¤½¥qªoº£¤uµ{©Ó¥]¡A©~®aªoº£¯»¨ê¡B¥~Àðªoº£
ªoº£¦Ñ®v³Å±M·~¬I¤u¡A¨Ó¹q§K¶O¦ô»ù¡I

­º­¶  ¡E  j2h ½×¾Â ¡E µ{¦¡³]­p°Q½×     ¡E 

[±Ð¾Ç]Apache ¨¾¤î¹Ï¤ù¥~³s(µs³s)

©ÐªF¡GÀu©f
µoªí®É¶¡¡G2006-07-25


²{¦b¶V¨Ó¶V¦h¤H±Ä¥Î¦Û¤v¬[³]¥D¾÷ªº¤è¦¡©ñ¸mºô­¶,¤]¦]ADSLªº»ù®æ³vº¥¤U·Æ,¦ý¦³µLµoı..¤é¤l¤[¤F,«çºô­¶¶}±Ò³t«×¶V¨Ó¶VºC??½u¤W¤]¨S¦h¤Ö¤H°Ú..¨ä¹ê¦³¥i¯à¬O¦³¨ä¥Lºô¯¸³sµ²±z¥D¾÷¤ºªº¹ÏÀÉ,¤À¨É¤F±zªºÀW¼e¤F!!¼W¥[¥D¾÷ÀW¼e­t²ü
¦]¦¹³]©w Apache mod_rewrite ¨Ó¨¾¤îmod_rewrite on

¤@. ¶}±Ò .htaccess Åv­­
1. ¶}±Ò httpd.conf
2. ·j´M AllowOverride None¡A©Î¬O¥u·j´M AllowOverride ÃöÁä¦r
3. §â None §ï¦¨ ALL¡Aªí¥Ü§¹¥þ±µ¨ü .htaccess ùتº©Ò¦³Åv­­³]©w¡AµM«á¦sÀÉ

¼W¥[¥H¤U¤º®eªº .htaccess ÀÉ¡A©ñ¦bºô¯¸¥Ø¿ý¤U§Y¥i¡C

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://lym.fyman.idv.tw(.*) [NC]
RewriteRule \.(jpg|jpeg|gif|css|swf|png|bmp|rar|zip|exe)$ - [F]

²Ä¤@¦æ¬°¶}±Ò RewriteEngine¡A¤G¤T¦æ³]©w¤¹³\ªº³s½u
²Ä¥|¦æ«h¬O±q¨ä¥L¦a¤è³s¶i¨Ó¥B¬O¨º¨ÇÀɦWªº¡A¬Ý¨ì403¿ù»~°T®§¡A¤]¥i¥H§ï¦¨Åã¥Ü«ü©wªº¹Ï¤ù¡C


©Î¬O¦bºô¯¸¥Ø¿ý¤Uªº .htaccess Àɤ¤¡B©Î httpd.conf Àɤ¤¥[¤J¤U¦C¤º®e§Y¥i¡G

µ{¦¡½X

SetEnvIfNoCase Referer "^http://yourdomain.com/" local_referrer=1
Order Allow,Deny
Allow from env=local_referrer


°O±o§â http://yourdomain.com/ ³o¤@¬q§ï¦¨¦Û¤vªººô¯¸ URL




  • ÃÙ§Uºô¯¸       

    ¼s§Q¤£°Ê²£-ªO¾ô¦b¦a¥Í®Ú³Ì¹ê¦b--·sªO¯S°Ï«ü¦W«×³Ì°ª¡B­È±o±z«H¿àªº¦n©Ð¥ò
    §¹¾ã©Ð°T¡A©Ð«Î¡B©±­±¼öªùºë¿ïª«¥ó¡A¼s§Q¤£°Ê²£ Àu½è¥ò¤¶¡A©Ð«Î¯²¸î¡B¶R½æ¸ê°T³z©ú¡A¥æ©ö¯u¦w¤ß¡I
    ¼s§Q¤£°Ê²£-·sªO¯S°Ï«ü¦W«×³Ì°ª¡B­È±o±z«H¿àªº¦n©Ð¥ò
    ±zªº¦«¥I,¼s§Q¥Î¤ß¬°±zªA°È

  • 1 ¼Ó¦í¤á¡GÀu©f
    µoªí®É¶¡¡G2006-07-25


    ª`·N!¥»±Ð¾Ç¥u°w¹ïapacheµ{¦¡¬[³]ªº¥D¾÷¦³®Ä!


    ½Ð­×§ï apache ¤¤ªº httpd.conf
    ½Ð§ä¨ì¤U¦C¤å¦r:

    Options All
    AllowOverride All



    ­×§ï¬°:

    Options FollowSymLinks Includes
    AllowOverride AuthConfig Limit

    Order allow,deny
    Allow from all

    SetEnvIfNoCase Referer \"^http://www1.xxx.com/ (http://www1.xxx.com/)\" local_ref=1
    SetEnvIfNoCase Referer \"^http://www2.xxx.com/ (http://www2.xxx.com/)\" local_ref=1

    Order Allow,Deny
    Allow from env=local_ref




    ¨ä¤¤ªºhttp://www1.xxx.com/¬°±z±ý³]­­ªººô§},¥i¼W¥[´î¤Ö...
    ¦A¨ä¤¤ªº(gif|jpg|jpeg|JPG|GIF|JPEG)¤º¬°±ý³]­­ªºÀÉ®×°ÆÀɦW,±z¥i¦Û¦æ­×§ï!


    ¦ý­n°O±o, ¦pªG§Aºô­¶¤¤¦³¨Ï¥Î¨ä¥Lµ{¦¡¨Ó©I¥sµ´¹ï¸ô®|ªº¹Ï¤ù®É,
    ½Ð¤@«ß­×§ï¦¨¬Û¹ï¸ô®|, §_«h¨º¨Ç¹Ï¤ù¤]·|Åܦ¨¤e¿N¥]ªº.


    2 ¼Ó¦í¤á¡GÂŪ¯
    µoªí®É¶¡¡G2007-02-23

    ²©ö§@ªk
    ¦bServer¤W³]©wReferer¨¾°ô¡A
    «Ü¦h¤Hª¾¹D­n¦b.htaccess¤W°Ê¤â¸}¡A³]©w


    SetEnvIfNoCase Referer "^http://([^/]*\.)?your.server.name/" local_referrer=1
    Order Allow,Deny
    Allow from env=local_referrer


    ´N¥i¥H®Ú¾ÚReferer¨¾¤îjpgµ¥Àɮ׳Qµs³s



    [½s¿è] »¡©ú
    ³]©w Apache mod_rewrite ¨Ó¨¾¤îmod_rewrite on

    ¶}±Ò .htaccess Åv­­
    1.¶}±Ò httpd.conf
    2.·j´M AllowOverride None¡A©Î¬O¥u·j´M AllowOverride ÃöÁä¦r
    3. §â None §ï¦¨ ALL¡Aªí¥Ü§¹¥þ±µ¨ü .htaccess ùتº©Ò¦³Åv­­³]©w¡AµM«á¦sÀÉ

    ¼W¥[¥H¤U¤º®eªº .htaccess ÀÉ¡A©ñ¦bºô¯¸¥Ø¿ý¤U§Y¥i¡C

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://lym.fyman.idv.tw(.*) [NC]
    RewriteRule \.(jpg|jpeg|gif|css|swf|png|bmp|rar|zip|exe)$ - [F]

    ²Ä¤@¦æ¬°¶}±Ò RewriteEngine¡A¤G¤T¦æ³]©w¤¹³\ªº³s½u
    ²Ä¥|¦æ«h¬O±q¨ä¥L¦a¤è³s¶i¨Ó¥B¬O¨º¨ÇÀɦWªº¡A¬Ý¨ì403¿ù»~°T®§¡A¤]¥i¥H§ï¦¨Åã¥Ü«ü©wªº¹Ï¤ù¡C


    ©Î¬O¦bºô¯¸¥Ø¿ý¤Uªº .htaccess Àɤ¤¡B©Î httpd.conf Àɤ¤¥[¤J¤U¦C¤º®e§Y¥i¡G

    µ{¦¡½X

    SetEnvIfNoCase Referer "^http://yourdomain.com/" local_referrer=1
    Order Allow,Deny
    Allow from env=local_referrer


    °O±o§â http://yourdomain.com/ ³o¤@¬q§ï¦¨¦Û¤vªººô¯¸ URL
    [½s¿è] ±q³]©wÀɤU¤â
    ª`·N!¥»±Ð¾Ç¥u°w¹ïapacheµ{¦¡¬[³]ªº¥D¾÷¦³®Ä!


    ½Ð­×§ï apache ¤¤ªº httpd.conf
    ½Ð§ä¨ì¤U¦C¤å¦r:

    Options All
    AllowOverride All



    ­×§ï¬°:

    Options FollowSymLinks Includes
    AllowOverride AuthConfig Limit

    Order allow,deny
    Allow from all

    SetEnvIfNoCase Referer \"^http://www1.xxx.com/ (http://www1.xxx.com/)\" local_ref=1
    SetEnvIfNoCase Referer \"^http://www2.xxx.com/ (http://www2.xxx.com/)\" local_ref=1

    Order Allow,Deny
    Allow from env=local_ref




    ¨ä¤¤ªºhttp://www1.xxx.com/¬°±z±ý³]­­ªººô§},¥i¼W¥[´î¤Ö...
    ¦A¨ä¤¤ªº(gif|jpg|jpeg|JPG|GIF|JPEG)¤º¬°±ý³]­­ªºÀÉ®×°ÆÀɦW,±z¥i¦Û¦æ­×§ï!


    ¦ý­n°O±o, ¦pªG§Aºô­¶¤¤¦³¨Ï¥Î¨ä¥Lµ{¦¡¨Ó©I¥sµ´¹ï¸ô®|ªº¹Ï¤ù®É,
    ½Ð¤@«ß­×§ï¦¨¬Û¹ï¸ô®|, §_«h¨º¨Ç¹Ï¤ù¤]·|Åܦ¨¤e¿N¥]ªº.




    ¡@¦@ 2 ¤H¦^À³¡@¡@¿ï¾Ü­¶¼Æ ¡i²Ä1 ­¶¡j 

    ©m¦W¡G
    §G§i¤º®e¡G
    ¨ä¥L¿ï¶µ: