How to update your .htaccess file
The .htaccessfile on your server is where advanced sever settings are controlled
Connect to your server using your favourite FTP client. My personal favourite is called CuteFTP, another good free one is FileZilla. In the main root directory of your website on the server (usually inside the public_html or www folder), you may already see a file called .htaccess. If you see you already have a .htaccess file, you can simply make the edits (in CuteFTP, you cann right click and select edit), then save the changes (to bring these into effect).
I would strongly recommend making a backup of your .htaccess file, just in case things go pear shaped (although changes can usually be easily undone)
If you don't already have a .htaccess file, simply open your favourite text editor (Notepad on Windows will do the job) to create a newfile called htaccess.txt. You can then make the updates to the txt file, upload it to the server via FTP, then change the filename to .htaccess (rather than htaccess.txt), which will put it into action!
Please keep the following in mind in regards to updating your .htaccess file
- Always be sure to upload .htaccess fules in ascii mode. Using binary in your FTP client will likely casue problems and make your server unhappy. Most ftp clients should do this automatically.
- If .htaccess does not work, there's a good chance you're on a Windows server, and will need to use other methods!
- Many operating systems don't allow you to create a file without something before the "." -- in this case you would be best to save the file as htaccess.txt, and change it once you've uploaded it to your server via your FTP client.
- Ensure your FTP client shows .htaccess files (FileZilla does and is free). Some FTP clients require you to manually turn this option on.
- Double check that you're not overwriting an old .htaccess file (many servers already place one there for any custom 404 pages and so forth.)