The Free .htaccess File Generator will take inputs to produce a .htaccess file you can upload to your website.
The .htaccess is a file that can be placed in any directory of your website (normally the root directory) to give the Apache Web Server instructions such as how to respond to particular requests.