Thanks Bruno. I'm so sorry for restating it again my situation before trying it; the situation like this: Right now, when you go to http://mycompany.com it goes to nowhere since it doesn't resolve to any IP address. I'm thinking, we can do it in the DNS that when someone trying to access http://mycompany.com it should resolve to www host. Thanks. S.Tux On 2/20/06, Bruno S. Delbono <Bruno.S.Delbono at mail.ac> wrote: > str tux wrote: > > Hello People, > > > > In my DNS setting I added A record of www for our company website. > > > > It works, when you go to http://www.mycompany.com; it resolves and it > > shows the website content. > > > > But in addition, I want also some kind of redirection or mapping (i > > don't know what you called that) that when people go to > > http://mycompany.com (without www), it should forward also to the www > > server. > > > > How to do it? Thanks in advance. > > If you are using apache as the webserver, you can create a redirect to it: > > Here is an apache2 mod_rewrite example: > > # For sites running on a port other than 80 > RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteCond %{SERVER_PORT} !^80$ > RewriteRule ^/(.*) > http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R] > > # And for a site running on port 80 > RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC] > RewriteCond %{HTTP_HOST} !^$ > RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R] > > More Info: > > http://httpd.apache.org/docs/2.0/misc/rewriteguide.html > > If you are running any other webserver...check it's docs. > > Warm Regards, > > -- > Bruno Delbono > Open-Systems Group > http://www.open-systems.org/users/bruno/ > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >