Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Last active December 13, 2023 23:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ziadoz/6ac1b0f4a0681454f051f8d23fa6442d to your computer and use it in GitHub Desktop.
StopTheMadness - Old Reddit Redirect Regular Expression
Redirect from New Reddit to Old Reddit, but ignoring media links, which break and point to a Lady Gaga nice hat page.
Links:
https://old.reddit.com/r/bugs/comments/15p1ctt/why_does_clicking_any_image_on_reddit_open_the/
https://github.com/tom-james-watson/old-reddit-redirect/blob/master/background.js
https://underpassapp.com/StopTheMadness/support-chrome.html#redirects
https://gist.github.com/msanders/52700d5c5ed76f1114594ddb862b530e
Pattern:
/^https?://www\.reddit\.com(?!/(?:(?:media|gallery|settings)\b|r/\w+/s/))([/#?].*)?$/
Replacement:
https://old.reddit.com$1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment