Can't set non-www redirection - serious problem

I have some serious problem. I’m using webmin and I have multiple websites on 1 VPS. I cant set redirection: ->

and there is strange thing:
When I enter “” it redirects to “/var/www/html” insdead “/var/www/”.
When I enter “” it redirects to “/var/www/” - its good.

So I have situation that when I enter: “”, “”, “” … it all redirects to same “/var/www/html” …
each,, - redirects to good folders and it works great.

I was trying to setup 301 redirection its just dont work. Also via webmin, like via FTP and .htaccess file

I don’t know how to do this right. And I didn’t find any related topic on forum.

Please help

PS. Sorry for my english is not my first language

+1 on this!

Edit: I figured out the problem that I was having… I just needed to create a cname record for www.