我们将Google-Adwords用于向网址投放gclid=xxxxx
参数的某些广告系列。
不幸的是,这会弄乱RealUrl表,下次调用页面时会导致404错误。
有没有办法让RealUrl忽略这个特定的参数?
答案 0 :(得分:1)
声称可以在GitHub上解决:
https://github.com/dmitryd/typo3-realurl/issues/377
无论如何我仍然遇到gclid触发urldata条目导致重定向循环的问题。现在我通过从ignoredGetparameters过滤器中删除gclid然后禁止它来解决它:
public void Main()
{
string sJSON = "{\"StudentInformation\": {\"rollNumber\": null,\"isClassLeader\": false,\"result\": \"Pass\"},\"CollegeInformation\": {\"allClass\": [\"A\", \"B\"],\"currencyAccepted\": \"INR\",\"calendarDates\": [],\"currencyCode\": \"INR\",\"collegeCode\": null,\"hasBulidingFundPrices\": false,\"hasHostel\": false,\"hasSecurityFares\": false},\"Collegetrips\": [{\"tripsdate\": [{\"departureTripDate\": \"2017-08-15 00:00:00\",\"Places\": [{\"destination\": \"Bombay\",\"price\": [{\"priceAmount\": 1726}]}]}]}]}";
Rootobject obj = Newtonsoft.Json.JsonConvert.DeserializeObject<Rootobject>(sJSON);
Price price = obj.Collegetrips.Select(ct =>
{
var r = ct.tripsdate.Select(td =>
{
var r1 = td.Places.Select(p =>
{
Price itemPrice = p.price.FirstOrDefault();
return itemPrice;
}).FirstOrDefault();
return r1;
}).FirstOrDefault();
return r;
}).FirstOrDefault();
if (price != null)
Console.Write(price.priceAmount);
else
Console.Write("Not Found!");
}
public class Rootobject
{
public Studentinformation StudentInformation { get; set; }
public Collegeinformation CollegeInformation { get; set; }
public Collegetrip[] Collegetrips { get; set; }
}
public class Studentinformation
{
public object rollNumber { get; set; }
public bool isClassLeader { get; set; }
public string result { get; set; }
}
public class Collegeinformation
{
public string[] allClass { get; set; }
public string currencyAccepted { get; set; }
public object[] calendarDates { get; set; }
public string currencyCode { get; set; }
public object collegeCode { get; set; }
public bool hasBulidingFundPrices { get; set; }
public bool hasHostel { get; set; }
public bool hasSecurityFares { get; set; }
}
public class Collegetrip
{
public Tripsdate[] tripsdate { get; set; }
}
public class Tripsdate
{
public string departureTripDate { get; set; }
public Place[] Places { get; set; }
}
public class Place
{
public string destination { get; set; }
public Price[] price { get; set; }
}
public class Price
{
public int priceAmount { get; set; }
}
答案 1 :(得分:0)
转到“安装工具”并将参数添加到[FE][cHashExcludedParameters]
。
答案 2 :(得分:0)
从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=/'
),
//[...]
像魅力一样,直到今天才知道这个选项甚至存在。