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.53k stars 158 forks source link

Trying to get Duckduckgo Bangs work with Startpage, but it only works the 2nd time I reload the page #398

Open chella1cm opened 5 days ago

chella1cm commented 5 days ago

I have setup Startpage as my default search engine and I am trying to get Duckduckgo bangs to work from the navbar.

I use this redirect setting to only redirect when I use an exclamation mark. Include pattern: ^https?://www.startpage.com/sp/search\?query=!(.+) Redirect to: https://duckduckgo.com/?q=!$1

So when I search it uses Startpage as expected and it should redirect to DDG when I use bangs. but instead it loads the startpage result with the !bangs when I select the Navbar with the url and press enter, it redirects to the DDG bang like I want.. Is there something I should do to make bangs work right from the navbar instead of from startpage result page?

chuangzhu commented 2 days ago

You forgot to escape the ? in search?query, should be ^https?://www.startpage.com/sp/search\?query=!(.+). Also, check whether you selected Regular Expression in Pattern type