Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create a rule to prepend to a URL #20

Closed
salfter opened this issue Feb 12, 2018 · 2 comments
Closed

Can't create a rule to prepend to a URL #20

salfter opened this issue Feb 12, 2018 · 2 comments

Comments

@salfter
Copy link

salfter commented Feb 12, 2018

It looks like prepending something to a URL causes the plugin to get stuck in a loop. Splitting the rule into two separate rules for HTTP and HTTPS doesn't help, either. It looks like what's needed is a way to have a rule work only against the entire URL instead of a substring. Perhaps a "^" operator (as with sed) to mark the beginning would work.

Consider this example:

*://**.4chan.org/*** rewritten to https://archive.is/*://**.4chan.org/***

If I click a link (such as http://boards.4chan.org/pol/thread/160062891/creamy-memes-for-our-team), it gets redirected to https://archive.is/http://boards.4chan.org/pol/thread/160062891/creamy-memes-for-our-team, as I want. When I then click the "archive this URL" link (https://archive.is/?url=http://boards.4chan.org/pol/thread/160062891/creamy-memes-for-our-team), though, it then gets redirected to https://archive.is/https://archive.is/?url=http://boards.4chan.org/pol/thread/160062891/creamy-memes-for-our-team, which isn't where we want to go.

@salfter salfter changed the title Seems to be rewriting more than just the request URL Can't create a rule to prepend to a URL Feb 12, 2018
@kylepaulsen
Copy link
Owner

kylepaulsen commented Feb 13, 2018 via email

@salfter
Copy link
Author

salfter commented Feb 13, 2018

Tried it out...looks like that does the trick. My first attempt at then archiving a page failed (since the fetches are done client-side), but temporarily disabling the plugin allows archiving to proceed as it should.

@salfter salfter closed this as completed Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants