Make sure that you create the htaccess file using plain ascii text i.e. Windows notepad, Linux Pico or the Apple equivalent.
You must also ensure that the htaccess file is uploaded in ascii format not binary. You can probably ensure this by uploading the file as htaccess.txt.
Then rename it the file to .htaccess once it is on your DreamHost account.
If you use the Control Panel to create .htaccess then you should use the Control Panel to delete it.
It may be a problem with the ftp program you are using where you would need to rename the file from .htaccess to htaccess.
The result will be this…
It might be an idea to let everyone know what OS and editing/ftp programs you are using as well.
Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK! :@
Act on my advice at your own risk!