Search The Hostwinds Guides Knowledge Base

How To Edit A .htaccess File

Share This Article

Please note that editing .htaccess files is very unforgiving. Even the slightest mistake can cause your site to display content incorrectly or not at all.

When editing your .htaccess file, always make a backup copy so you can get back to a working configuration if something goes wrong.

Linux systems are case sensitive, even the URL.

If you have trouble uploading the file you may have to name it htaccess.txt and then rename it once it’s on the server. Should be replaced with your domain name in the below examples

Simple Redirects:

More Advanced Options:

For WordPress users:

If your site stops working, the .htaccess file is the first place you should check.

Rename the .htaccess file to .htaccess_bak and then browse to your site.

This works a lot of the time.

If renaming the .htaccess file fixes your site you can then place the following standard WordPress .htaccess configuration into a new .htaccess file.

Here are the contents of the default WordPress .htaccess file:

Helpful Related Articles