Closed ghost closed 1 year ago
Give this a try.
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2023-07-18T07:49:41.654Z",
"redirects": [
{
"description": "Redirect reddit to teddit",
"exampleUrl": "https://www.reddit.com/",
"exampleResult": "https://teddit.net/",
"error": null,
"includePattern": "^https?://(?:(?:[^.]+)\\.)?reddit.com/(.*)",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "https://teddit.net/$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"grouped": false,
"appliesTo": [
"main_frame"
]
}
]
}
Give this a try.
{ "createdBy": "Redirector v3.5.3", "createdAt": "2023-07-18T07:49:41.654Z", "redirects": [ { "description": "Redirect reddit to teddit", "exampleUrl": "https://www.reddit.com/", "exampleResult": "https://teddit.net/", "error": null, "includePattern": "^https?://(?:(?:[^.]+)\\.)?reddit.com/(.*)", "excludePattern": "", "patternDesc": "", "redirectUrl": "https://teddit.net/$1", "patternType": "R", "processMatches": "noProcessing", "disabled": false, "grouped": false, "appliesTo": [ "main_frame" ] } ] }
The rule appears not to match https://old.reddit.com/
and https://www.reddit.com/
(note that loads of other Reddit subdomains are functional and some widely used, most notably np.reddit.com/
).
Above rule will match https://old.reddit.com/
and https://www.reddit.com/
.
Also you can try this ^(?:https?:\/\/)?(?:(?:[^.]+)\.)?reddit.com\/(.*)
@tillcash On a related note, do you know what exactly is wrong with the rule I initially shared?
^https://(?:.*\\.)?reddit.com/(.*)
I'll re-open the issue if this is a Redirector bug. In regex ^
matches the starting position...
@07416 The regex syntax provided does not meet the specified criteria. To validate the syntax, you can make use of the website https://regex101.com/.
create a rule:
attempt to view a saved page matching the pattern on Wayback Machine:
https://web.archive.org/web/20230000000000*/www.reddit.com/r/selfhosted/
The addon redirects to the destination instead. Reproduced on a new Firefox 114.0 profile (Redirector 3.5.3) ; the exported addon config: