A .htaccess file comes with Q2A. It should be in the main (root) folder - some operating systems hide files beginning with a dot so if you don’t see it make your file browser/FTP show hidden files.
If you still can’t find it, you can download it here: https://github.com/q2a/question2answer/blob/master/.htaccess