-
Notifications
You must be signed in to change notification settings - Fork 119
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
Comments
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
Make a rule above that one that looks like:
https://archive.is/* --> https://archive.is/*
This rule doesn't redirect anywhere, but it will stop the rules below from
executing.
…On Mon, Feb 12, 2018 at 2:45 PM, Scott Alfter ***@***.***> wrote:
Consider this example:
*://.4chan.org/ <http://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 t.
More generally, 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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AA01LAHbfHuZ7qtygRltj2mATe-s2IEcks5tUL8kgaJpZM4SC8hy>
.
--
-Kyle Paulsen
|
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 tohttps://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 tohttps://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 tohttps://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.The text was updated successfully, but these errors were encountered: