Yes it is, but it's not the best way. I would look into browser extensions for redirecting requests.
Here is how to do it on the network layer:
You need to use a hosts file with one entry per subdomain (or a dns-server with wildcards), like this:
127.0.0.1 en.wikipedia.org
Then you run a webserver on localhost, which redirects all accesses to en.wikipedia.org
to en.0wikipedia.org/
while preserving the path. This can be done for example with mod_rewrite for apache.
Direct redirect per hosts file is not working, as the hosts file has nothing to do with redirecting anything, but is just a basic form of name resolution mechanism. The solution above just uses this to fake that en.wikipedia.org
is served from your computer and then redirects the access to your webserver to the target url.
Further you need to have a certificate on the server as the urls use https, which needs to have an security exception in your browser, because it is either self-signed or for another domain as you won't get a certificate for the wikipedia domain from any certificate authority which is in your browsers certificate store.
So while it is possible, it is quite complicated especially because of the https part.
Thanks to @TheFiddlerWins for pointing out the problem with https.