Support formats alone on fields
For instance I have this url:
https://example.com/?redirectUrl=https://google.com
If I put in URL field just %q or %q[redirectUrl]
The redirect result should be https://google.com, currently Redirect Link don't support it, or I'm doing something wrong?
The objective here is make a rule to skip the redirect, going direct to the original url.
%q[redirectUrl] does work for me. %q doesn't work because it tries to load redirectUrl=https://google.com, which is invalid address. I think for %q only it makes sense to have all the query parameters.
Estrange not work here, I set it so:
Enable URL:
https://deref-gmx.com/mail/client/
also tried
https://deref-gmx.com/mail/client/*
in URL I put just
%q[redirectUrl]
Don't work here, the query parameter is
/?redirectUrl=https%3A%2F%2Fgithub.com%2Ffluks%2Fredirect-link%2Fissues%2F35%23issuecomment-1678953396
So the whole URL you are trying to redirect is https://deref-gmx.com/mail/client/?redirectUrl=https%3A%2F%2Fgithub.com%2Ffluks%2Fredirect-link%2Fissues%2F35%23issuecomment-1678953396 ? I can't load that link because the site redirects that automatically back to https://www.gmx.com/. Can you post some other example which doesn't work?
Another instance:
https://www.google.com/imgres?imgurl=https%3A%2F%2Ftressays.files.wordpress.com%2F2015%2F09%2Ftest-clip-art-cpa-school-test.png
I tried put just %q and tried also just %q[imgurl] on URL field, don't worked, I'm doing something wrong?
%q shouldn't work and it doesn't. But %q[imgurl] does work. I don't know why it doesn't work for you. Did you leave Enable URL blank? Try it if you didn't. Or can you see the option to redirect that URL and it just fails?
If you can go about:debugging and then This Firefox and press inspect and then try to redirect and go to console tab and see if there's an error.
Any error on console, I do not tried blank url because I need the Always option and to work only in a specific url, but I tried redirect manually and don't go, the result of manual redirection is:
moz-extension://*********/background/https%3A//tressays.files.wordpress.com/2015/09/test-clip-art-cpa-school-test.png
******* = extension id
I'm using firefox 112.0.1 is it maybe? My rule:
Okay, now I know the reason. If you first open the previous example URL and then redirect, it works, but if you try to redirect the link, it doesn't. And the reason is that at least %3A isn't decoded to :, so Firefox doesn't understand it as a valid URL. So, the query parameter needs to be URL decoded. I need to think this a little that can the resulting redirect URL always be fully URL decoded in the end.
I also suspected about the enconded URL, I hate this encoded URLs :D