We have moved our website to a new domain and our SEO department want to have some redirect from the old urls to the new urls with 404 status code. I dont know if it is possible and want to collect some opinions from the community
My question: i want to try to configure a redirect from a internal url to a external URL with 404 as status code in Nginx. I have tried with rewrite
and return
. But it looks like that it's imposible.
rewrite
can only return 301 or 302 as status code.return
can't do any redirect with 404.- I have tried with
rewrite last
andreturn 404
. But it didn't work, because i want to redirect to external URL.
Anyone has some idea?