如何在htaccess上使用HTTP_REFERER重定向
问题描述:
我做了研究,但是我仍然无法完成这项工作...
I did my research, but I'm still not able to make this work...
我要做的就是重定向所有传入的流量从另一个网页上的特定链接到我选择的页面...
All i'm trying to do is to redirect all incoming traffic from a specific link on another webpage to a page of my choosing...
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} http://theotherwebsite.qc.ca/ [NC]
RewriteRule ^http://www.cnn.com$ [L]
为什么不起作用?
答
-
RewriteCond需要一个正则表达式
RewriteCond needs a regular expression
RewriteCond%{HTTP_REFERER} ^ http://theotherwebsite\.qc\.ca / [NC]
RewriteRule需要一个正则表达式,应重定向的内容和目标对象
RewriteRule needs a regular expression what is should redirect and the target
RewriteRule ^(。*)http://www.cnn.com [L]