Redirect parameters like $S and $U #378
IllDepence
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Currently the only supported parameters are $U (URL of blocked page), $S (block set number), and $K (keyword that triggered the block, if there was one). Perhaps the neatest and most flexible solution to your request would be to allow the user to specify (probably under Advanced Options!) a regular expression to match against the URL and allow numbered variables within the URL of the blocking page ($1, $2, etc.). I don't think this would be too hard to implement. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was searching for documentation on parameters to use in redirect parameters like
$S
and$U
in the default redirect URL but could not find anything besides sections in the source code. E.g.:LeechBlockNG/common.js
Line 9 in e94ae98
In the end I would like to do something like match a URL with a regex
^https?:\/\/(?!old\.)[a-z.]*reddit\.com(.*)$
and then redirect tohttps://old.reddit.com$match_group_1
. Or if currently$U
can be manipulated in some way do a simpler matching and then redirect tohttps://old.reddit.com$U_but_without_host
.Is this possible? Or are there other parameters like
$U
except for the domain, path, and fragment? If not, they (and/or a parameter for a match group in a regex) would be handy. :)Thanks in advance for any info.
Beta Was this translation helpful? Give feedback.
All reactions