How to Edit Your .htaccess File

What is .htaccess file?

“The .htaccess file in your account is a plain text file that provides a way to make configuration changes to your website.”

  1. Loging into your cPannel.
  2. Click on the File Manager icon under the Files area
  3. Select the document root folder for the domain you want to edit the .htaccess file for.
  4. Make sure you select the option for Show Hidden Files (dotfiles).files_cpanel_file_manager
    5. In the cPanel File Manager select the .htaccess file and make a copy of it by selecting Copy in the File Manager menu

    select_option_for_htaccess_file
    6. In the dialog window that appears, type in the name you want for your .htaccess backup and click the Copy File(s) button. In this example, we are naming the file “.htaccess_bk”

    rename_htaccess_bk
    7. This will create a backup of your .htaccess file

    8. Now we are read to to open the .htaccess file for editing. Click on the .htaccess file and select either Edit or Code Editor in the File Manager menu.

    edit_the_htaccess_file
    9. Please use the following steps to re-enable WP admin area (this will enable admin area access to your own PC)
    add this rule in their .htaccess

    <Files ~ "^wp-login.php">
    	Order deny,allow
    	Deny from all
    	Allow from x.x.x.x
    </Files>
    replace x.x.x.x with their ip what they get from www.whatismyip.com

    10. Once your edits to the .htaccess file are complete, click on the Save Changes button in the upper right of the page and then click the Close button to close the file and return to the File Manager.

 

About

Kimberly Ashton is an employee at SkyNetHosting.Net.Inc and mainly concentrates on web designing and technical blogging. She is interested in SEO social media and all things web related. Her focus is on making absolute beginners comfortable with different web related methodologies and to help them grasp the basics of web designing easily.