I have not found the anti-leech METHOD FOR THE litespeed server using htaccess for a long time on the Internet. I consulted them and said they could be used in Apache writing. As a result, I did a lot of research and finally wrote something that could be used, Code Below:
ReferenceCopy codeThe Code is as follows: rewriteengine on
Rewritecond % {http_referer }! ^ Http://planetidc.com/.#$ [Nc]
Rewritecond % {http_referer }! ^ Http://planetidc.com $ [Nc]
Rewritecond % {http_referer }! ^ Http://www.planetidc.com/.#$ [Nc]
Rewritecond % {http_referer }! ^ Http://www.planetidc.com $ [Nc]
Rewritecond % {http_referer }! ^ Http://www.xaoyo.net/.#$ [Nc]
Rewritecond % {http_referer }! ^ Http://www.xaoyo.net $ [Nc]
Rewritecond % {http_referer }! ^ Http://xaoyo.net/.#$ [Nc]
Rewritecond % {http_referer }! ^ Http://xaoyo.net $ [Nc]
Rewriterule. * \. (JPG | JPEG | GIF | PNG | BMP | CSS) $-[F, NC]
Rewriterule. * \. (JPG | JPEG | GIF | PNG | BMP | CSS) $-[F, NC] You can also change this sentence to display the expected error message.
ReferenceCopy codeThe Code is as follows: rewriterule. * \. (JPG | JPEG | GIF | PNG | BMP | CSS) $/404.shtml [R, NC, l]