How to setup .htaccess in WordPress

It will depend on the permalink structure.

If you decide to use the custom structure with /cetgory/postid-posttitle/, then you should have the following htaccess file :

# BEGIN WordPress

   RewriteEngine On
   RewriteBase /

   RewriteRule ^index\.php$ – [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]


# END WordPress