Solved: It turns out I needed to add https://
to the redirect URL. I now edited the redirect to be this:
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2024-12-25T00:25:04.487Z",
"redirects": [
{
"description": "sh.reddit.com submission page",
"exampleUrl": "https://old.reddit.com/r/firefox/submit?selftext=true",
"exampleResult": "https://sh.reddit.com/r/firefox/submit?selftext=true",
"error": null,
"includePattern": "https://.*?reddit.com/((r|u|user)/.*?/submit.*)",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "https://sh.reddit.com/$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"grouped": false,
"appliesTo": [
"main_frame"
]
},
]
}
Using the Redirector addon, I wrote a redirect from a Reddit submit page to the new new Reddit submit page but it doesn't work when I go to https://old.reddit.com/r/firefox/ and click "submit text", it just takes me to https://old.reddit.com/r/firefox/submit?selftext=true despite the link working in the example box.
Reproduction: Install the addon, save the following as a json file, click on addon icons and select "edit redirects", then click import to select the json file.
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2024-12-22T15:43:42.356Z",
"redirects": [
{
"description": "sh.reddit.com submission page",
"exampleUrl": "https://old.reddit.com/r/tds_roblox/submit",
"exampleResult": "sh.reddit.com/r/tds_roblox/submit",
"error": null,
"includePattern": "[a-z]+?:\\/\\/.+?reddit.com\\/((r|u|user)\\/.+?\\/submit.*?$)",
"excludePattern": "",
"patternDesc": "",
"redirectUrl": "sh.reddit.com/$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"grouped": false,
"appliesTo": [
"main_frame"
]
},
{
"description": "Old Reddit",
"exampleUrl": "https://www.reddit.com/r/reddit",
"exampleResult": "https://old.reddit.com/r/reddit",
"error": null,
"includePattern": "[a-z]+?:\\/\\/.*?\\.reddit\\.com\\/(((r|u|user)\\/.*)|$)",
"excludePattern": "[a-z]+?:\\/\\/.+?reddit.com\\/((r|u|user)\\/.+?\\/submit.*?$)",
"patternDesc": "",
"redirectUrl": "https://old.reddit.com/$1",
"patternType": "R",
"processMatches": "noProcessing",
"disabled": false,
"grouped": false,
"appliesTo": [
"main_frame"
]
}
]
}