我想知道怎么弄 HTTP标头引用
答案 0 :(得分:1)
这是解决方案
RewriteCond %{HTTP_HOST} ^www.exampleFrom.cz [NC]
RewriteCond %{HTTP:Referer} (.*)
RewriteRule ^(.*)$ http://www.exampleTo.cz/$1?utm_source=%{HTTP:Referer} [L,R=301]
解决方案是使用来自referer的解析域
RewriteCond %{HTTP_HOST} www.exampleFrom.cz [NC]
RewriteCond %{HTTP:Referer} ^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/\n]+)
RewriteRule ^(.*)$ http://www.exampleTo.cz/$1?utm_source=%1&utm_medium=referal&utm_campaign=myDomainCampaign [L,R=301]