URL Rewriter
Extension Delisted
This extension is no longer available in the official store. Delisted on 2025-09-17.
Rewrite URLs according to a custom regex when accessing a web page.
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
Hard to use if you are not familier with those expressions
Does just what I need. Thanks!
It does what is says it will do. Nice and simple. Docked a star due to the slight issue where URLs opened in a new tab are not re-written.
Latest version works as expected. My use case: rewriting URLs opened in a new tab via link.
Works as advertized
Will not actually change URLs tried to use it to recover URLs from broken extension URLs (verified possible by hand). Test case works as expected, but extension would never modify the actual URL.
Doesn't rewrite if open from hyperlink
Only the first rewrite rule works.
After setting up the regex, I can see that it can parse and rewrite the URL in the tester. But then, when posting the URL in the Address Bar, nothing is happening - still opening the original URL.
Extension itself works as expected. But left my system with ~20-30% CPU load when idle. Load disappeared when deactivating the extension. Even after several restarts/reboots.
It works as advertised ! :-D I really bothered me to always change the domain name of the links my colleagues sent me. Now, I can just click on the link and it replaces the domain name automatically. Thank you !
First, this broke Chrome: all clicks went to the settings page. I reinstalled, then it sorta worked but when opening a link, it OPENED THE FULL LINK and THEN replaced it, so the original, tracked link still got accessed. 👎
Sad to say - does not work. After setting up the regex, I can see that it can parse and rewrite the URL in the tester. But then, when posting the URL in the Address Bar, nothing is happening - still opening the original URL.
Doesn't work. Maybe it worked at some point. I copied the test url I was using that had the correct rewrite happening in settings into the url bar, hit enter, and its not rewritten.
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
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.
Awesome!
This is a good idea but regular expression is not work at all. Coder gets mark 2-
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.
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.
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.
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.
Works perfectly in both Chrome and Opera. Thanks!
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.
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.
Does what it says. Upvoting.
Perfect! Goodbye Youtube, hello Invidio!
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.
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.
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.
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...
Very good - does just what it should! Having some examples in the main window would help, and a small regex cheatsheet.
This extension doesn't implement basic regex replace functionality. You can't have a single rule modify more than one part of the URL.
Didn't seem to work - even when you plug in the example content. Sad, this is exactly what I'm after!!
Great idea, but extension does not work :( Even the example from extension overview.
SUCKS
To the point. Unusual among Chromium extensions.