Actually, my ‘solution’ created problems with accessing the Network Admin site with too many redirects. I had to remove the ‘www’ on the database and wp-config.
The good news is that your solution above works in redirecting all links with www to the non-www links! great!
One more question – if I would like to add on the www, how can I do so without messing up things on my site?
I found a simple solution. Add the ‘www’ into wp- config & also on the database!