我们使用谷歌广告的一些活动,广告一个gclid=xxxxx参数的网址。不幸的是,这会弄乱RealUrl表,下次调用页面时会导致404错误。
有没有办法让RealUrl忽略这个特殊的参数?
发布于 2017-06-07 19:38:22
据称这是在GitHub上解决的:
https://github.com/dmitryd/typo3-realurl/issues/377
无论如何,我仍然有一个问题,即gclid触发了一个urldata条目,这导致了一个重定向循环。现在,我解决了这个问题,从ignoredGetparameters过滤器中删除gclid,然后禁用它:
'cache' => array( // removed gclid from the filter, then ban it
'ignoredGetParametersRegExp' => '/^(?:utm_[a-z]+|pk_campaign|pk_kwd|TSFE_ADMIN_PANEL.*)$/'
'banUrlsRegExp' => '/gclid|tx_solr|tx_indexed_search|(?:^|\?|&)q=/',
),发布于 2016-11-04 21:17:15
转到Install工具并将参数添加到[FE][cHashExcludedParameters]。
发布于 2017-02-01 04:47:31
从realurl 2开始,有了一种新的可能性来控制tx_realurl_urldata的条目:
https://github.com/dmitryd/typo3-realurl/wiki/Configuration-reference#banurlsregexp
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT'] = array(
//[...]
'cache' => array(
'banUrlsRegExp' => '/gclid|tx_solr|tx_indexed_search|(?:^|\?|&)q=/'
),
//[...]工作起来像个护身符,直到今天才知道这个选项的存在。
https://stackoverflow.com/questions/40405505
复制相似问题