1. Use rewrite to confirm that your apache can use rewritemodRewriteEngineonRewriteCond % {HTTP_REFERER }! ^ Http://webjx.com /.*
1. Use rewrite to confirm that your apache can use rewrite mod
RewriteEngine on
RewriteCond % {HTTP_REFERER }! ^ Http://webjx.com/.#$ [NC]
RewriteCond % {HTTP_REFERER }! ^ Http://webjx.com $ [NC]
RewriteCond % {HTTP_REFERER }! ^ Http://www.webjx.com/.#$ [NC]
RewriteCond % {HTTP_REFERER }! ^ Http://www.webjx.com $ [NC]
RewriteRule. * \. (gif | jpb | png | css | js | swf]) $ http://www.webjx.com [R, NC]
The colored items must be changed to yours:
Red: you provide the download page address, that is, you can only download the provided stuff through this address.
Blue: to protect the file extensions (separated by |), that is, files with these extensions can only be accessed through Red addresses.
Green: If you do not use a red address to access files with blue extensions, the system redirects back to the Green address.
2. use SetEnvIfNoCase and access
SetEnvIfNoCase Referer "^ http://webjx.com" local_ref = 1
SetEnvIfNoCase Referer "^ http://www.webjx.com" local_ref = 1
Order Allow, Deny
Allow from env = local_ref
Red indicates a trusted site, and blue indicates a protected file extension.