Closed hades200082 closed 7 years ago
Can you try passing it into the prerender config like this?
<prerender blacklist="/user"></prerender>
I have this currently...
<prerender blacklist="/blog*,/blogs*,/admin*,/door-designer*,*\?ctype*,*\?utm*,*\?gclid*,*\.aspx*"\>
Will this work?
That should work. You can see the delimiter is the comma: https://github.com/greengerong/Prerender_asp_mvc/blob/1e68eaf3252420bd6c138c10a9777672d3f2c3d6/Prerender.io/PrerenderConfigSection.cs#L74
Those are regexes so should they be "/blog.,/blogs...." ?
Ok.. so how would I specifically target a querystring?
e.g. /foo?bar=123 OR /about?bar=123 to target any URL with "bar=123" on the querystring.
Probably something like /foo?.*bar=123
Why are you trying to target the query string? If you are using the hosted Prerender.io, you should just ignore the query strings from our UI.
@hades200082 Looking at the source code, the querystring can't be part of the whitelist/blacklist because it's only looking at HttpRequest.Url: https://github.com/greengerong/Prerender_asp_mvc/blob/master/Prerender.io/PrerenderModule.cs#L150.
@hades200082 Still want to got blacklist with querystring?
@tysonnero There use regex.IsMatch(url.AbsoluteUri) . You can check the the document https://msdn.microsoft.com/zh-cn/library/system.uri.absoluteuri(v=VS.110).aspx.
I need to exclude URL's that have certain query strings (i.e. Google's ?utm_...) as well as certain paths on my site.
I see there is a blacklist option but I can't find any documentation about it.