-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use redirect option with negated domain #310
Comments
Seems to work for Tested on |
another limitation of redirect directive it seems.. |
The issue is that The issue here can be solved only if changing all the semantic of the |
So this is a won't fix ? |
I could make the filter |
You mean |
I meant what I wrote. |
Why would it apply on the negated domain ? |
Filter will be split into two parts: blocking part and redirecting. Negation will disable blocking. Blocking by any other means/filters will trigger redirection. |
Wouldn't negation affect redirection too ? If that's the case, then there's no point in adding a negated domain with redirection. |
Don't think the filter you wrote works for negated...to me looks like a.com will follow the filter rule but the negated domain will not work with the filter (it will be discarded).
Not sure what that another filter is...please post example? |
Related issue: - uBlockOrigin/uBlock-issues#310 The purpose of this new option is to add the ability to create standalone redirect rule without being forced to create a block filter (a corresponding block filter is always created when using the `redirect=`). Additionally: The syntax `*$redirect=token,...` is now supported, there is no need to "trick" the filter parser with `*/*$redirect=token,...` in order to create redirect rules which are meant to match all paths. Filters of the form `|http*://` will be normalized into two corresponding filters `|https://` and `|http://` so as to reduce the number of filters in the buckets of untokenizable filters.
I am going to decline this, using negated domains with redirect option is ambiguous. In case of ambiguity, use two separate filters, one for blocking, one for redirecting with |
How to create global redirect rule and then disable it on one domain? |
on https://github.com/uBlockOrigin/uBlock-issues/wiki/Static-filter-syntax
|
Like that |
Should be fixed by gorhill/uBlock@157cef6 Tested by
one by one and works fine. |
Prerequisites
Description
I am writing some filters but I noticed the below kind didn't work
*pop.js$important,script,redirect=noopjs,domain=~site.com
Why negated domains don't work at all with redirect option? I would like to create filters to do this as I don't mind performance hit, can deal with breakage myself and would rather redirect some file names totally. Is it possible to add a way to do this?
The text was updated successfully, but these errors were encountered: