Hi and welcome to LQ,
First you must make sure that both myweb.com and
www.myweb.com resolve to the same IP. You can check it by running:
Code:
host myweb.com
host www.myweb.com
If the don't match you need to talk to the dns admin so he makes an alias.
Then you need to use mod_rewrite in apache
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.myweb.com [NC]
RewriteRule (.*) http://www.myweb.com/$1 [L]
You can put the above into httpd.conf, or in a .htaccess file in /var/www/html
Regards