Tsohost Knowledge Base

WordPress - The .htaccess file

Modified Tuesday 7th April, 2015 at 03:29

Was this helpful?

What is the .htaccess file used for?

WordPress writes specific rules to the .htaccess file on the web server. The .htaccess file tells the web server how it should serve up the permalinks, according to the permalinks structure that you have chosen to use.

Are there any specific requirements for the .htaccess file?

To make use of the .htaccess file you need to ensure that:

  • The .htaccess file is available on the server and you have access to it.
  • The web server runs Apache with the mod_rewrite module enabled.

The default .htaccess rewrite rules should look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] 
</IfModule> # END WordPress

*Note: If you ever see a 404 Not Found error on your website, this will usually mean that the default .htaccess rewrite rules are missing from the .htaccess file*


WordPresshtaccess

Still can't find what you're looking for?

That's not a problem. Our 24/7 customer support team are friendly and waiting to help answer your questions. The easiest way to get in touch is to raise a support ticket; simply click the button below.

Open Support Ticket