Htaccess redirect not working

Hi - First time poster here. I have a site that’s hosted elsewhere, but Dreamhost handles the DNS. I’m trying to do a mod_rewrite in my .htaccess file, per the instructions here, but it doesn’t seem to be working for me.


  1. Is this text all I need to include in the htaccess file I created, or should there be more?RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.net$ [NC] RewriteRule ^(.*)$1 [L,R]

  2. Can I just put the .htaccess in the folder via FTP, or is there somewhere else it needs to go?

Thanks for the help!

if all you are doing is redirecting, why not just set it up in the panel? much easier.

RewriteEngine on RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} [NC] RewriteRule ^(.*)$1 [L,R=301]

This is the code I used when I was on Apache. Give it a try. And yes, you just have to upload the .htaccess to the root directory. In your case, it’s the / folder.