.htacess don't works!

Why .htacess don’t work in my website?

What i’m doing wrong?

  1. I create in notepad " .htacess "

  2. I insert that code:


RewriteEngine On RewriteCond %{HTTP_HOST} !^mydomain.com$ [NC] RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]

  1. Send the .htacess created from Notepad via FTP Filezilla Client, I send for /home/myuser
    but it don’t work!

Nothing code work in .htacess!

What is my error?

Two problems that I see are the spelling .htaccess and /home/myuser is one level above where apache will look, you need to use /home/myuser/domain.com/.htaccess

Also, what you’re trying to do (redirect to remove the “www” in your domain name) is already exposed as an option in the DreamHost Panel, under “Manage Domains > Edit”.