in

Where to find your .htaccess file and how to edit it

Context : Apache Server / WordPress

These days a lot of online bloggers and most of them independently handle their websites and .htaccess file location is mystery to many.

If you are a beginner and do not have much knowledge of coding or how websites work, this post will help you understand what is .htaccess file and how to edit it. Since most bloggers use WordPress, Drupal or Joomla for their blogging platform and these CMS mostly run on Apache Server, you must have encountered a problem with your .htaccess file at some point or another.

htaccess stand for Hypertext Access and its an important configuration file when your site is running on Apache server. The next question that comes now is what is the importance of this file? It helps visitors to your website to interact with it and can even block specific visitors, spam etc by configuring. You should never name this file and use it with extension only because its name itself is “.htaccess” and if you change the name, then your site will not open because the server will not be able to read the file.

If you are encountering a problem with this file, you can find the file through two basic methods, i.e. by logging into your cPanel or using a FTP method.

Accessing through cPanel:
1. you just need to log-in to your cPanel (setting will be provided by your hosting service provider).
2. This file is usually hidden, so make sure you have clicked “show hidden file”. Click on setting (right corner) and then “show hidden file”.
.htaccess file location file cpanel

..htaccess file location file cpanel show hidden file

3. Now you will be able to see the file, so just right click on the file and click download.

Accessing through FTP:
1. Login to your server using a FTP software like WinSCP or Filezilla.
2. Go to your public-html or www or app folder there you can find the file.
3. You can drag drop in the left pane or just right click and download to get the file.

.htaccess file location

Now, how to edit the file. This can be done by using window notepad or notepad ++. We recommend you notepadd++ because if your use this software, it you will be more confortable editing your other file like php or css etc. So when you open the file, just put your code and click save, that’s it.

Now, after editing just put the file back to its place using cPanel or FTP and overwrite the older file to give effect.

TIP: .htaccess file is not a file to be playing around with, so whenever you make any change, make sure you have backup of the older file. Just in case you mess it up,  at least you are back to the earlier stage by using the older file.


Do let us know if you need any help, we will try to add more tutorials concerning your technical problems. Thanks.


 

Jorgee Malware Mozilla/5.0 Jorgee

Jorgee Malware gives sleepless nights to many. Here’s how to deal with it

How to keep your WordPress spam free 1

How to keep your WordPress spam free