RewriteEngine on
RewriteCond %{HTTP_REFERER}!(.*)ocean-leecher.net(.*)
RewriteCond %{HTTP_REFERER}!(.*)blindtext.info(.*)
RewriteCond %{HTTP_REFERER}!(.*)yourdomain.com(.*)
RewriteRule ^(.*)$ - [F]
此代码接受3个推荐人流量到主域的所有页面。
有没有办法让这段代码仅对maindomain.com/thankyoupage.php
答案 0 :(得分:0)
添加以下
RewriteCond %{REQUEST_URI} ^/thankyoupage.php$
答案 1 :(得分:0)
将您的代码更改为:
RewriteEngine on
RewriteCond %{HTTP_HOST} maindomain\.com$ [NC]
RewriteCond %{HTTP_REFERER} !(ocean-leecher\.net|blindtext\.info|yourdomain\.com) [NC]
RewriteRule ^thankyoupage\.php$ - [F,NC,L]