.htaccess will work for you. I'm on a shared server myself. All you have to do is place the file in whatever folder you want it to effect. If you put it in your public_html folder it will effect your whole site, unless cancelled out by an .htaccess file in a sub-folder with differing commands.
.htaccess files are one of the most overlooked tools available.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.