- Make sure 'rewrite_module' is loaded:

httpd -M | grep rewrite_module (in FreeBSD)
apachectl -M | grep rewrite_module (in Linux)

- If it's not enabled, configure Apache to load the module:

LoadModule rewrite_module libexec/apache/mod_rewrite.so (add the line in httpd.conf in FreeBSD)
a2enmod rewrite (in Linux)

- Add 'AllowOverride All' in the 'Directory' section of the directory where you want to enable .htaccess. For example, to enable .htaccess under /var/www/wordpress, the 'Directory section should be something like this:

        <Directory /var/www/wordpress>
            AddHandler cgi-script .cgi
            Options +Indexes +ExecCGI
            DirectoryIndex index.php
            Order allow,deny
            Allow from All
            AllowOverride All
        </Directory>