The ingress.kubernetes.io/rewrite-target is used for rewriting the request URI, not the host.
It looks like from your link you're using the nginx ingress controller. You can get the effect you want by adding a second Ingress for example.nl that uses the ingress.kubernetes.io/configuration-snippet annotation to add the 301.
{
"apiVersion": "extensions/v1beta1",
"kind": "Ingress",
"metadata": {
"name": "example-staging-wwwredir",
"annotations": {
"ingress.kubernetes.io/rewrite-target": "/",
"ingress.kubernetes.io/configuration-snippet": "return 301 $scheme://www.example.nl$request_uri;"
}
},
"spec": {
"rules": [
{
"host": "example.nl",
"http": {
"paths": [
{
"path": "/",
"backend": {
"serviceName": "example-service",
"servicePort": 80
}
}
]
}
}
]
}
}