extension ExtPose

URL Rewriter

Description from extension meta

Rewrite URLs according to a custom regex when accessing a web page.

Image from store URL Rewriter
Description from store NOTES: * Don't let the unimpressive rating fool you. This is a simple, no-nonsense extension that does exactly what it says and no more. You have to know how to create a Javascript-flavor regular expression to use it. * Chrome will inform you that this extension can "Read your browsing history". This is a result of two permissions that we require: "webNavigation" to intercept navigation requests and rewrite the URL, and "tabs" to open the existing extension options page (if already exists) instead of creating a new one when you click on the icon. I do not care about your browsing history. WHAT'S NEW: * You can now remove part of a URL by leaving the replacement text blank. * The test page warns you if your rewrite rule is going to remove the protocol (http://, https://) from URLs making them relative. Based on "Host name rewriter" by Mattias Lundberg. URL Rewriter edits certain URLs, whether typed in or linked, via a set of rules before navigating to the URL. A rule consists of a regular expression specified in capture groups, a capture group number to replace, and the replacement text for that group. When you click on a link or type a URL in the address bar, it is checked against each of the rules. If a matching rule is found, the text of the specified capturing group number is replaced with the specified text. Example: - Regex: ^(http[s]?\:\/\/.*\.)(toothboiler)(\..*\/watch\?v=.*)$ - Group number to replace: 2 - Replacement text: youtube - If you click a link for "http://www.toothboiler.com/watch?v=abcdefg", it matches the regex rule and capture group 2 ("toothboiler") is replaced with "youtube" to result in "http://www.youtube.com/watch?v=abcdefg".

Latest reviews

  • (2020-04-10) Aleksey Egorov: I cannot replace multiple groups :( e.g., I want to replace https://t.me/s/group?before=308 to tg://resolve?domain=s?before=308&post=SLivyTGM
  • (2020-04-08) LOLNATIONCH: If you want to modify links when you click url, this is for you. My use case, url that cannot be access without rdp, but has a second access point using only the vpn, but with a different url. Was very annoying when looking at my email on my computer without rdp. Had to modify 2 group, so I made two rule. Would have rated 5 stars if you could replace an N number of group with N text.
  • (2020-03-16) Autoplay: Awesome!
  • (2020-03-07) Igor Polovykh: This is a good idea but regular expression is not work at all. Coder gets mark 2-
  • (2020-02-17) Tyler Gary: At first glance, regex will work as it should on the test section of the options page, but you may wonder why the extension does not modify URLs in practice. Another commenter highlighted the issue: you must refresh the page for the edit to apply. I'll take an extra F5 over clicking around with the mouse any day of the week, but I wish it would filter on first submission.
  • (2020-02-04) Nils Jakobson: Does not work. Wasted like 30 minutes thinking I am totally lost with regexps but apparently it simply does not work. Gotta read comments before you download plugins. Lesson learned.
  • (2019-12-24) Nick Bamji: Unfortunately didn't work for me either. Regex is good and expands correctly in the test box. Copying and pasting URLs into the test box lets you copy and paste the resulting URL out...but the extension doesn't replace either linked or typed URLs. Maybe Google changed a Chrome feature since the last update? Example of a non-working regex: ^(http[s]?\:\/\/uk-mkivs.net\/)(topic\/)(.*) Replace group 2 with "index.php?showtopic=" Should replace eg "https://uk-mkivs.net/topic/126816-rear-headrests/" with "https://uk-mkivs.net/index.php?showtopic=126816-rear-headrests/" but doesn't.
  • (2019-09-25) Micheal Espinola: TDLR: It works. Its effective. It could use some refinements. At its core, it does exactly what its intended to do, which is a regular expression search and replace of the URL. The organization of the information however is cumbersome with no compressed list layout or sorting ability. There are greasemonkey scripts that can do the same, but allow you to see your arguments in a organizable list format. If this extension would allow for something like that, then I would give it would 5 out of 5 instead of 4 out of 5 stars. What gives this extension its 4 stars instead of less, is its convenience to test your regular expression without having to go to a 3rd party website or load up a regex utility.
  • (2019-08-22) Jan Killian: Works perfectly in both Chrome and Opera. Thanks!
  • (2019-08-19) Michael Koeber: only seems to work on pasted URLs even though it's description says it works on links as well Edit: to get it working on links, you just need to reload the page each time. [Assuming that's universal], put that in the description and I'd rate this 5 stars.
  • (2019-08-08) Sergio Martins: Great Extension very good, does just what it should, i give 5 stars when url changes in this case: I am on a website yyyy.com and i click on a link that takes me to zzzzzz.com, i have a rule to zzzzzz.com replace by zzzzzz.net but as i didn't open in a new window or tab the regex is not applied. The extension should work every time you change the address or click on a link, and currently only works when I change the address bar.
  • (2019-05-13) M Yussuf: Does what it says. Upvoting.
  • (2019-05-09) M: Perfect! Goodbye Youtube, hello Invidio!
  • (2019-03-18) Does exactly what it says it does, and no more. Tip: You must have a group for every piece of the URL you'd like to retain.
  • (2019-02-07) Papa Prodigious: Didn't do what I expected; I wanted to use this to modify ALL requests to a specific domain (e.g. for embedded CSS URL's) but sadly this only picks up and modifies URL's visited in the address bar.
  • (2018-12-16) Balázs Szabó: It took some time until I figured out how it works, but after that, it is working well. What I expected is that I have a regex matcher with one group in it, and it replaced the matched group with something else, for example I expected to write something like that: (www\.|web\.|m\.)facebook.com, replace group 1 with empty string, but instead I have to create groups for everything that remains, too, like: (https?://)(www\.|web\.|m\.)(facebook.com.*), replace group 2 with empty string.
  • (2018-10-22) Klaus Reimer: Unfortunately it only works with the URLs I enter into the URL bar of the browser. It doesn't rewrite URLs requested with the Fetch API or Image source URLs...
  • (2018-07-26) Howard L Frederick: Very good - does just what it should! Having some examples in the main window would help, and a small regex cheatsheet.
  • (2018-06-11) Colin Griffith: This extension doesn't implement basic regex replace functionality. You can't have a single rule modify more than one part of the URL.
  • (2016-04-14) Scott Morris: Didn't seem to work - even when you plug in the example content. Sad, this is exactly what I'm after!!
  • (2015-11-23) Oleg Stepin: Great idea, but extension does not work :( Even the example from extension overview.
  • (2015-07-15) MRNIKUSHA101: SUCKS
  • (2015-06-18) Ahmad Gharbeia: To the point. Unusual among Chromium extensions.

Latest issues

  • (2020-05-19, v:0.13) Shay Levy: Remove part of url
    Hi I want to remove #autoplay from the following url (or any url from that site that includes it): https://www.ynet.co.il/articles/0,7340,L-5732254,00.html#autoplay This is the regex I used: '^(.*)(#autoplay)$' and I'm replacing group number 2 with nothing The tester shows that #autoplay is removed but when I click links that includes it it doesn't work. Am I doing something wrong? Many thanks -shay
  • (2020-04-07, v:0.13) Moaaz Ali: Extension now working
    Hi, I'm using your extension for long. However, nowadays it does not rewrite the url given that the regex rules are as working in the test. But when I use the same link in the browser, it does not change at all Best
  • (2019-08-28, v:0.13) Da Niel: Not working in a private mode window
    That's what I use mostly, so this great plugin is sadly useless.
  • (2019-08-09, v:0.13) Sergio Martins: Export Import settings
    There should be a possibility to export and import the settings
  • (2019-06-19, v:0.13) Atilla Karaca: url replace and add suffix
    I want to redirect `https://en.wikipedia.org/wiki/some_article` to `http://localhost:7891/some_article.html` How can I do it with regex?
  • (2019-03-25, v:0.13) Pascal Naber: Clicking a link doesn't work
    When I search in Google for anything related to azure, the search results contains nl-nl. I replace this with: (https://)(docs|azure)(.microsoft.com/)(nl-nl)(.*) That works great if the domainname is typed in. But not when I click on a link in google search results for example. Any solution?
  • (2018-08-03, v:0.13) Walter Francis: Possible to add to a URL?
    I'm trying to force a url to include a string, for example https://www.reddit.com/r/AskReddit/ I want to append "new", so it's https://www.reddit.com/r/AskReddit/new Since Reddit defaults some horrid algorithm which they think users want but don't let them change. You have to change to "new" every time. I tried ^.*reddit.com/r/\w+/(.*)$ 1 and new, which should set 1 (a blank string) and replace it with "new" but I can't seem to get that to work.
  • (2016-03-02, v:0.11) David Lawrence: remove string
    It does not appear to be possible to have a string removed, which is unfortunately the reason I wanted this addon. It insists that there be replacement text. Could you allow an option for no replacement text?
  • (2016-03-02, v:0.11) David Lawrence: browsing history?
    Why does this addon need access to my browsing history?
  • (2015-12-23, v:0.11) regex tests correctly but doesn't redirect
    Regex tests correctly but doesn't redirect. URL is typed manually in address bar.
  • (2014-09-18, v:0.11) Sjoerd Nuijten: Regex detected but redirects me to plugin url?
    I've added a regex (tested to work) to bypass the steam link filter. http://puu.sh/bE7jD/7d5dc7ae03.png First off I could not insert nothing in the replace box (I only want to remove part of the link). Secondly it redirects me to chrome-extension://gpbblpbcnjdnnjdcdclojoonfmpoionh/ if it's detected...
  • (2014-08-11, v:0.11) Emmanuel C.: Dosent work when clicking
    Only work with addresses typed or pasted in, not when clicking a link.

Statistics

Installs
1,358 history
Category
Rating
3.3214 (28 votes)
Last update / version
2018-05-23 / 0.13
Listing languages

Links