By installing a WordPress (or other CMS, eg Drupal, Joomla) you would definitely encounter a file called .htaccess. If you wondered what it is and what it is you are in the correct publication.
The .htaccess file is a powerful one tool which can secure your website but also improve its speed performance. But first you should understand the basics of .Htaccess and then let's see how you can use it.
What is the .htaccess file?
It is an abbreviation derived from the conditions Hypertext Access. It is basically a valuable configuration tool used by Apache Web Servers to control the folders contained and all the subfolders within them.
If you cannot see the file on your server or the hosting package you are using, it is because the dot at the beginning of the name makes it secret.
To see it you need to connect to the server with someone ftp client (it's a link for the free application Filezilla, of course you can use any client you want), that you have set to show hidden files.
To edit the file, use the free Windows tool notepad ++ (it will be good for processing files stored on a linux server do not use the classic Windows notepad).
What can you do with a .htaccess file?
- to protect the files in the folder that is located
- to prohibit certain IPs from viewing your site
- to fix links that do not work with redirection to the correct ones
- to remove the category from URLs
- block IP addresses and search engines
- specify whether your website will use www or just the domain name
- to compress your website for faster speed
- remove all question marks (?) from the links on your site
- redirect all your visitors to a different web site, regardless of the URL they type.
- And much more
Continue to the next post