Feature Suggestion: Rewriting URLs

While Reddit and YouTube are thankfully rarely returned on most of my search results unless it’s relevant, I occasionally need to visit one of those two sites, but I will always use a frontend like libredd.it or invidious.snopyta.org when I do so.

I can just copy the link and rewrite the domain myself, but it would be far more convenient if Mojeek returned the URL I wanted when I searched for it in place of the original URL.

They could be rewritten with Regex.

Example:

^reddit.com|libredd.it
^youtube.com|invidious.snopyta.org

2 Likes

Duly noted, will chuck it in. I can see the value from a good deal of time doing this through the LibRedirect extension (I think that was it).

Guess this also could be something for people who studiously avoid the Daily Mail/any other paper which has a domain to access it without jimmying up ad views.

2 Likes

Yes, please. This would be wonderful.

i think that would be problematic because these 3rd party front-ends are often hit or miss

LibRedirect does this at the browser level and will switch between instances if one is down

Counter-argument: I own several computers, and I don’t want to install an extension on each of them for something I rarely use.

Besides that, a user may want to see old.reddit.com instead of reddit.com or a libreddit instance. But Libredirect won’t support this use case because it clashes with their goals; they suggest you install another extension if you want that: [Support] Where is the redirection to old reddit for reddit? · Issue #310 · libredirect/libredirect · GitHub

I briefly installed the extension on another browser, but it doesn’t seem you can add any custom regex redirects, though you can add custom sites to a particular redirect class, like Reddit.

There are other use cases, like documentation, which Libredirect doesn’t cover at all. For example, say you’re looking for the Symfony documentation on a particular feature, but it pops up with the 4.4 version of what you’re looking for: https://symfony.com/doc/4.4/create_framework/introduction.html

You only want to see the current version, which is 6.2. So you can write a regex for that:

 ^https://symfony.com/doc/(?:[^/]+)/(.*) | https://https://symfony.com/doc/current/$1 

Now you’ll get all Symfony documentation results Mojeek returns rewritten with the current version of that page.

The only issue with implementing this in Mojeek is you still have to export the cookies or a file with a list of your redirections to import into another computer/browser instead of just saving them to your Mojeek account, which is no easier than importing the settings for Libredirect.

I do think Libredirect is better for some use cases, like your contacts sending you links to reddit; Mojeek won’t rewrite that for you. And spreading activity across more instances is a good idea. But I don’t think that serves as a complete counter-argument for implementing this convenience feature in Mojeek.

For instance, I think users should setup custom search engines at the browser level, rather than relying on Duckduckgo’s Bangs. It’s faster because you don’t have to redirect through Duckduckgo and you don’t send any of your queries through Duckduckgo. However, you do need to setup custom search engines on every browser and computer, whereas thousands of Bangs are already prepared, no matter what computer or browser you use.

So there’s a convenience factor that can trump technical superiority.

here’s my the counter-counter argument :slight_smile:

i can completely understand why they dumped old.reddit because it’s still a reddit domain and given the purpose of the extension (privacy), that’s a no-no

I want LibRedirect to focus as much as possible on privacy friendly stuff like how the requirements said.

you can add old.reddit to your hosts file if you read but don’t publish on the platform

obviously what shall be done is up to the wonder-peeps (wonderful people) at mojeek, but i personally think your suggestion exceeds what a search engine ought to do, plus, as i mentioned, these alt. front-ends are very hit and miss which means mojeek might need to ping the instances… every x minutes or every time someone searches for anything that contains a reddit result, for example… and distribute traffic accordingly, and getting a pile of traffic thrown at them by a search engine would very likely cause some/most/all of them to explode

but these are only my personal thoughts - whatever mojeek will do, they will do … i just wanted to make sure they see some of the possible consequences (which they probably already realize without me saying a word) - for the most part people make these alt. front-end services available for free and i just kind of think that whacking them with a search engine might be taking advantage

i can completely understand why they dumped old.reddit because it’s still a reddit domain and given the purpose of the extension (privacy), that’s a no-no

I agree that the software has the responsibility of not leading the user toward services that infringe on their privacy, but a user should have the freedom to make their own decisions. You can’t write custom regexes with Libredirect, however, so there isn’t much the developers could have done differently. The users already have the freedom to implement the feature themselves.

I’m not saying they’re wrong to do this, but that this use case goes unfulfilled.

these alt. front-ends are very hit and miss which means mojeek might need to ping the instances… every x minutes or every time someone searches for anything that contains a reddit result, for example… and distribute traffic accordingly, and getting a pile of traffic thrown at them by a search engine would very likely cause some/most/all of them to explode

My suggestion is not to replicate what Libredict has done with having redirect “templates”. It’s to have free-form rewrites using regex. What the user has these rewrites do is up to them. I merely mentioned my use case of invidious and libreddit rewrites, but I find myself looking up Bootstrap/Symfony documentation too, of course. There are more scenarios where rewrites would be useful, I’m sure.

In fact, I’m against leading users to use these services even through a more user-centric frontend for several reasons, but I don’t think this has anything to do with regex rewrites.

for the most part people make these alt. front-end services available for free and i just kind of think that whacking them with a search engine might be taking advantage

This wouldn’t involve pinging the sites at all. The page links returned by Mojeek would just be re-written based on what regex the user supplies.

Of course, it’s up to Mojeek whether they implement this or not, and I can see both sides. I do want to properly represent the suggestion, though.

ah, i see - i didn’t understand that from your first post

in that case, nothing i said is relevant

No worries. I can see how you might have gotten that impression; I focused on a particular use case for the feature rather than the mechanics of it in an effort to keep it concise. My bad.