daverix / urlforwarder

Enables you to use bookmarklets on Android
GNU General Public License v3.0
44 stars 7 forks source link

Replacing a letter in a url #13

Open clement-moulin-frier opened 2 years ago

clement-moulin-frier commented 2 years ago

Hi,

Thanks for the app. I'd like to use it for the following use case by I can't figure out how to do it:

When browsing the url www.example.com/t, I would like to automatically redirect to www.example.com/m. (I.e, I just want to replace the t at the end of the url by a m.)

I have tried many different configurations but none of them worked. Could you help me on this?

Thanks a lot!

daverix commented 2 years ago

Hi, it doesn't work like that, you need to share the current page to be redirected to the new page. Simply browsing the page is not supported.

Or if you want to share a specific url then simply just input the url to match and then what you want to be redirected to.

clement-moulin-frier commented 2 years ago

Yes I understood that I need to share the webpage with urlforwarder. If I understand well what you say in your second paragraph, I have to configure it with (using my example use case described in my first post): Filter url: www.example.com/t/ Replaceable text: www.example.com/m/

I have tried it but it redirects me to the original url www.example.com/t/ instead of the desired one www.example.com/m/.

Thanks!

daverix commented 2 years ago

Okay now I understand what you mean.

It's not possible currently to remove anything from the url you want to forward to.

Replaceable text is only what text to replace in the filter url.

Filter url: replaceMe/t Replaceable text: replaceMe

Would append /t to the url you share, but you cannot currently remove /m. I'm working on changing the app to regular expressions so that you can use groups to get parts of the incoming url and add it to the outgoing as needed. In this case would be able to match the host part and forward only that.