qq_35011659 2018-08-06 03:26 采纳率: 0%
浏览 623
已结题

SEOApache配置修改 http rewrite

根据url规则 写cookie值
第一种: 域名后的第一个值放入cookie 第一个竖线和第二个竖线之间
https://xxx.com/wholesale/wedding+dresses.html
cookies 值: seo|wholesale||organic|搜索引擎|搜索关键词|
https://xxx.com/manufacturers/wedding-dresses-suppliers.html
cookies 值:seo|manufacturers||organic|搜索引擎|搜索关键词|
第二种:m. 后的值放入 cookie 第一个竖线和第二个竖线之间
https://m.ca.xx.com/skater-skirt-woman-canada.html
cookies 值:seo|ca||organic|搜索引擎|搜索关键词|
https://m.au.xx.com/knit-skater-skirt-australia.html
cookies 值:seo|au||organic|搜索引擎|搜索关键词|

RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.+)(\?q=|&q=|\?p=|&p=|\?text=|&text=)([^&]*)gate([^&]*)(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%{ENV:pkey}||brand|%2|%5gate%6|:dhgate.com:43200,S=6]
RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.+)(\?q=|&q=|\?p=|&p=|\?text=|&text=)([^&]*)(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%{ENV:pkey}||organic|%2|%5|:dhgate.com:43200,S=5]
RewriteCond %{HTTP_REFERER} ^http://(\S+\.)?(google)\.(.*)/search$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%{ENV:pkey}||organic|%2|search|:dhgate.com:43200,S=4]
RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.*)$ [NC]
#RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%{ENV:pkey}||organic|%2|http|:dhgate.com:43200,S=3]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%{ENV:pkey}|%{REQUEST_URI}|organic|%2|http|:dhgate.com:43200,S=3]
RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(youtube)\.(.*)/watch\?v=([^&]*)(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:%2|organic|%4||||:dhgate.com:43200,S=2]
RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(youtube|twitter|facebook|pinterest|instagram|bit|reddit)\.(.*)/?(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:%2|organic|||||:dhgate.com:43200,S=1]

RewriteCond %{REQUEST_URI} /wholesale-refine/(.*)$ [NC]
RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(google|yahoo|bing)\.(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|cate-attr||organic|%2|http|:dhgate.com:43200,S=7]

RewriteCond %{HTTP_REFERER} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.+)(\?q=|&q=|\?p=|&p=|\?text=|&text=)([^&]*)(.*)$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|||organic|%2|%5|:dhgate.com:43200,S=6]

RewriteCond %{HTTP_REFERER}-split-%{REQUEST_URI} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.*)-split-/(wholesale|manufacturers|discount|online-shopping|free-shipping|hot-product|uk|price|reviews)/(.*)\.html$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%4||organic|%2|http|:dhgate.com:43200,S=5]

RewriteCond %{HTTP_REFERER}-split-%{HTTP_HOST} ^https?://(\S+\.)?(google|yahoo|bing|aol|ask|search-results|yandex)\.(.*)-split-(au|ca|nz|uk)\.dhgate\.com$ [NC]
RewriteRule ^(.*)$ $1 [CO=ref_f:seo|%4||organic|%2|http|:dhgate.com:43200,S=4]
  • 写回答

1条回答 默认 最新

  • dabocaiqq 2018-08-06 14:34
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘