I’m trying to redirect any request to Google to another site. What I currently have works for google.com and google.com/test (they go to example.com and example.com/test respectively), but not for a Google search (google.com/search?…). What am I doing wrong here?
My manifest:
{
"manifest_version": 3,
"name": "Redirect Google",
"version": "1.0",
"declarative_net_request": {
"rule_resources": [{
"id": "ruleset_1",
"enabled": true,
"path": "rules_1.json"
}]
},
"permissions": [
"declarativeNetRequest"
],
"host_permissions": [
"*://*.google.com/*"
]
}
My rules_1.json:
[{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"transform": {
"host": "example.com"
}
}
},
"condition": {
"urlFilter": "||google.com",
"resourceTypes": ["main_frame"]
}
}]