0 Shares

I am sure as a blogger you all are aware of htaccess. The .htaccess is the abbreviation of Hypertext Access, and is a server configuration file that is mostly used by apache based web server. HTACCESS generally controls the directory it live in and the other directories underneath its parent directory.

In this article I’m going  to talk more about .htaccess  file which is a very important file both search engine optimization  and security of your website.

What is .htaccess file?

htaccess

Supported by most web servers, htaccess file is a server configuration file that overrides the web server configuration for the directory that it is in, and all sub-directories within the directory.

HTACESS files are simple ASCII files with the extension .htaccess and no file name. Many people find it confusing for the strange naming structure but it is easy to create with any text editor.

The file remains hidden in your web server until you force your FTP client to show hidden files.

Sample .htaccess Code for wordpress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
How to create .htaccess file?

I am not going to deep technical here.  Well if you are in windows you can create a text file  and name it as .htaccess . Remember there should not be any file name (filename.htacess). But it should be only .htaccess.

How to use the .htaccess file?

The .htaccess file is a very powerful tool when it comes to website security and search engine optimization. Things like Rewriting URLs, Customized error responses, Cache Control, Directory listing, server-side includes, blocking IPs can be performed by configuring the htacces files.

However any single mistake in writing the code can cause server errors and leave your site in not showing up. So you must take a great care while editing the codes.

How to edit .htaccess file?

As mentioned earlier, .htaccess files are text files and can be edited as a text file in general. But you must take a back up of the initial file before you upload the changed one.

So, you have it. Stay tuned for next part of the article where we will discuss more about the different htaccess codes to use for your specific requirement and SEO purpose.

0 Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here