This page is the redirect target of requests matching rule 1 from redirect-rules.json.
The pattern ||example.com/| means: (sub)domain of example.com, with path "/" and nothing else before the end of the URL.
{
"id": 1,
"priority": 4,
"condition": {
"urlFilter": "||example.com/|",
"resourceTypes": ["main_frame"]
},
"action": {
"type": "redirect",
"redirect": {
"extensionPath": "/redirectTarget.html"
}
}
},
For the redirect to have succeeded, three conditions must be met:
- The declarativeNetRequest (DNR) rule should match the request.
- The extension must declare the pre-redirect URL in
host_permissions (in manifest.json) and the user should grant the permission.
- The extension path in
extensionPath must be declared in web_accessible_resources (in manifest.json), and the pre-redirect URL should match the pattern in matches.
See popup.html for the permissions UI and examples.