Homeinet.htaccess Part One

.htaccess Part One

Installing a WordPress (or other CMS, e.g., Drupal, Joomla) you will surely encounter a file called .htaccess. If you wondered what it is and what it does you are in the right post.

The .htaccess file is a powerful tool that can secure your website, and also improve its performance in speed. However, first you need to understand the basics of .htaccess and then see how you can use it.

htaccess

What is the .htaccess file?

It is an abbreviation that comes from the terms Hypertext Access. Basically, it is a valuable configuration tool used by Apache Web Servers to control the folders it contains and all the subfolders within them.

If you cannot see the file on your server or in the hosting package you are using, it is because the dot at the beginning of the name makes it hidden.

To see it, you will need to connect to the server with an ftp client (this is a link for the free Filezilla application, you can of course use any client you want), which you have configured to show hidden files.

To edit the file, use the free Windows tool notepad++ (it would be good to not use the classic Windows notepad when editing files stored on a Linux server).

What can you do with an .htaccess file?

  • to protect the files that exist in the folder where it is located
  • to forbid certain IPs from viewing your site
  • to fix links that do not work by redirecting them to the correct ones
  • to remove the category from the URLs
  • to block IP addresses and search engines
  • to set whether your website will use www or only the domain name
  • to compress your website for greater speed
  • to remove all question marks (?) from your site's links
  • to redirect all your visitors to a different website, regardless of the URL they type.
  • and many more

Continued in the next post

📧
Subscribe to the SecNews Newsletter

The most important Security & Technology news in your Inbox.

SecNews
SecNewshttps://www.secnews.gr
In a world without fences and walls, who needs Gates and Windows

SEARCH

FOLLOW US

📧
Newsletter SecNews
The most important Security & Technology news in your inbox.

LIVE NEWS