2012-03-21 24 views
2
RewriteEngine on 
RewriteCond %{HTTP_REFERER}!(.*)ocean-leecher.net(.*) 
RewriteCond %{HTTP_REFERER}!(.*)blindtext.info(.*) 
RewriteCond %{HTTP_REFERER}!(.*)yourdomain.com(.*) 
RewriteRule ^(.*)$ - [F] 

此代碼接受3個引用流量到主域的所有頁面。單引用流量.htaccess

有什麼辦法來使該代碼有效的只是maindomain.com/thankyoupage.php

回答

0

你的代碼中添加以下

RewriteCond %{REQUEST_URI} ^/thankyoupage.php$ 
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]