You should be able to use
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"url": "https://stackoverflow.com/questions"
}
},
"condition": {
"urlFilter": "https://stackoverflow.com/|",
"resourceTypes": ["main_frame"]
}
}
]
since a |
dictates that no more characters may come after it.
See: chrome.declarativeNetRequest
- URL filter syntax - Chrome Extension API