Skip to content

[fr] Allow pattern matching page URL for resource redirections #436

@afontenot

Description

@afontenot

Some people only use Redirector to redirect main window URLs, but one obvious additional use is to change a resource used by a page (image, JS, etc) to some other URL.

Unfortunately, URLs may be embedded in multiple pages, and you may only want to redirect the URL on one page but not another.

It would be really nice for Redirector to include a "Source" field, and only activate the redirect when the source field matches the page URL. This would be backwards compatible because if the source field is missing or absent, you can use the current behavior instead.

Example: an old website uses a JS library that has been updated, and now the site no longer works because a function has been deprecated. After this feature is added to Redirector, I create a redirect with a "Source" pattern matching this one site, and redirect the link to the script to a versioned link at one of the major JS CDNs. Obviously, I wouldn't want to create such a redirect in Redirector currently, because it would redirect the script link on every other website as well, even ones that require different versions of the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions