Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
how to redirect www.example.com to example.com via htaccess while on zend framework

I want to redirect

www.example.com to example.com

Can any body help me, How can do that using htaccess.

share|improve this question

marked as duplicate by womble, Janne Pikkarainen, Bart De Vos, Smudge, Chopper3 Aug 3 '11 at 13:42

This question was marked as an exact duplicate of an existing question.

This should do it;

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ 
RewriteRule (.*) http://example.com/$1 [R=301,L]
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.