einaregilsson / Redirector

Browser extension (Firefox, Chrome, Opera, Edge) to redirect urls based on regex patterns, like a client side mod_rewrite.
http://einaregilsson.com/redirector/
MIT License
1.54k stars 162 forks source link

[site] Built-in Example Doesn't Work #356

Open ryanpeach opened 1 year ago

ryanpeach commented 1 year ago

I can't get the extension to capture and redirect any URL on chrome. The builtin example doesn't even work. Please advise.

It is enabled.

Gitoffthelawn commented 1 year ago

@ryanpeach Hi Ryan. Sorry to hear you are experience some challenges getting Redirector to work for you. The extension definitely works (many thousands of users), so there must be something unique on your end.

Several things to try when troubleshooting:

  1. Test with the current general release version of your browser (not a beta or alpha/canary/nightly release)
  2. Test with a new browser profile
  3. Test without any other browser extensions or add-ons installed
  4. Install Redirector extension directly from a trusted source

And then there's always the generic advice:

  1. Reboot
  2. Perform a malware scan, preferably initiated from its own bootable media
  3. Try another computer
  4. Conclude that life would likely be simpler if we all tossed out our computers, and maybe this is the universe sending you a gentle little message. ;)
thehale commented 1 year ago

I'm experiencing the same issue on the latest official Microsoft Edge.

Version details:

image

Video demonstration:

https://github.com/einaregilsson/Redirector/assets/47901316/5d7df721-e2ff-4662-ba1f-8094b0c575c4

I tried both https://example.com and http://example.com in case the extra "s" made the difference, but to no avail.

As shown in the video, I was unable to get the built-in example to work for a brand-new browser profile with no other extensions installed. I also did the test after a fresh reboot of my computer. I've tested the extension with installations from both the Chrome Web Store and the Edge Add-ons marketplace, so I'm unsure what other "trusted source" you'd prefer I try.

I also checked the "enable logging" box but was unable to find where the logs are located. I had expected the browser console since that's where console.log sends log messages, but, as shown in the video, there's nothing there from Redirector.

Let me know what else I can help test to narrow down the issue. The extension looks promising, so it's disappointing that I can't seem to figure it out.

Gitoffthelawn commented 1 year ago

@thehale wrote:

Let me know what else I can help test to narrow down the issue. The extension looks promising, so it's disappointing that I can't seem to figure it out.

Sorry to hear you're having issues. Have you tried any other browsers, such as Firefox, Vivaldi, Ungoogled Chromium, or Chrome?

thehale commented 1 year ago

@Gitoffthelawn I just tested with a fresh install of Firefox on a different computer and had the same issue.

https://github.com/einaregilsson/Redirector/assets/47901316/350d3d79-0b55-4a4c-b857-b1cabea5d632

ghost commented 1 year ago

Same here on Chrome 118.0.5993.70, tried it on multiple profiles as well as Brave 1.58.137 (Chromium: 117.0.59) on the same machine, on Linux with XFCE...

ghost commented 1 year ago

I updated Chrome to the latest and tried again. The example suddenly started working but my twitter.com -> nitter.net redirect would not work so I had to install the Nitter Redirect extension to get it working again.

aprilmintacpineda commented 10 months ago

Doesn't work for me too, even after I restart my chrome. I tried making it work to the best of my knowledge, but I really can't do anything. Even simple redirects like example.com to redirect-works.com doesn't work for me. I hope there's more ways for us to find out what's wrong but seems like there isn't, I don't even know if I can access any logs at all.

unlucio commented 5 months ago

I've been trying to make this extension work for a couple of months, installing it, disinstalling it, reinstalling it, all the usual traditional voodoos, all the possible voodoo lists I found, but nothing so far, and I'm not really sure what I'm doing wrong.

I'm using Brave Version 1.66.118 Chromium: 125.0.6422.147 (Official Build) (arm64) on an M1 processor.

Here's my current config:

Screenshot_2024-06-07_at_16_01_00

Even tho both the "example lines" show the correct expected url change, nothing happens when browsing to either youtube or example.com.

Here's the config I added for youtube:

Screenshot_2024-06-07_at_16_00_43

I turned logs on to try to figure out what's going on, but "redirector" doesn't show up in the Dev tool's console, so I'm not sure how to debug it.

Gitoffthelawn commented 5 months ago

I've been trying to make this extension work...

In the screenshots provided, it looks like you likely have a space character (ASCII 32 decimal) before the Redirect to string in the first rule. Try editing that string and deleting any characters before the h in https.

In the second rule, it is defined to only work if you try going to http://example.com. If you are entering example.com in your browser's address bar, and your browser is configured to redirect HTTP requests to HTTPS, the redirect will never have an opportunity to run. To change this, you can modify the Redirect string from http://example.com/* to https://example.com/*.

jadedgnome commented 5 months ago

@unlucio check the box "HistoryState"

include pattern: ^https://.*youtube.com/watch\?v=(.*)

redirect to: https://tube.domain.com/watch?v=$1

select regular expression