내 이미지의 보호를 구현하려고하는데 내 코드에 어떤 문제가 있습니까?.htaccess 핫 링크 보호를 구현하는 방법
// If referral is from google but NOT from "http://www.google.com/blank.html", redirect home
RewriteCond %{HTTP_USER_AGENT} !(googlebot|bingbot|Baiduspider) [NC] //If user agent is NOT bot
RewriteCond %{HTTP_REFERER} !^$ //Allow blank referral
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] //if referral is from google
RewriteCond %{HTTP_REFERER} ^http://www.google.com/blank.html$ //if referral is NOT from that url
RewriteRule http://www.mydomain.com/ [R,L] //redirect home
// If referral is from my domain and accessing images, do nothing
RewriteCond %{HTTP_USER_AGENT} !(googlebot|bingbot|Baiduspider) [NC] //If user agent isn't bot
RewriteCond %{HTTP_REFERER} !^$ //Allow blank referral
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mydomain.com [NC] //if referral is from my domain
RewriteCond %{REQUEST_URI} !(^|&)images(&|$) //if URL contains string "images"
RewriteRule ^.*$ - [NC,L] // DO nothing
// If referral is NOT from my domain and accessing images, show watermarked image
RewriteCond %{HTTP_USER_AGENT} !(googlebot|bingbot|Baiduspider) [NC] //If user agent isn't bot
RewriteCond %{HTTP_REFERER} !^$ //Allow blank referral
RewriteCond %{HTTP_REFERER} mydomain.com //if referral is NOT from my domain
RewriteCond %{REQUEST_URI} !(^|&)images(&|$) //if URL contains string "images"
RewriteRule ^images/(.*)$ http://www.mydomain.com/cache/$1 [NC,R,L] //redirect to watermarked image
나는 꽤 많은 단계를 this answer의 2를 만들려고 해요,하지만 난에 문제가 있어요 "같음에"와 "같지 않음에"나는 PHP와 출신으로! 연산자가 같지 않음에 사용됩니다.
도와 줄 사람이 있습니까?