如何在htaccess上使用HTTP_REFERER重定向 [英] how to redirect using HTTP_REFERER on htaccess
本文介绍了如何在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]
这篇关于如何在htaccess上使用HTTP_REFERER重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文