How to Access Your .htaccess

This article explains how to access to make changes to your .htaccess file within an Apache/Ngnix and Linux environment.
 
Caution: Before making any modifications to your web.config make sure you create a viable backup of your site that can be restored should the edits create a problem. To back up your site, refer to Back Up Your Website Using Plesk.

Your .htaccess file is located in the httpdocs folder. To edit this file 
you can use Notepad ++ or simply Notepad to make changes to the .htaccess file.


Options for Accessing Your .htaccess file
Use FTP to Download, Modify, and then Upload the Web.config File Back to the Server
  1. Open your FTP program on your local machine
  2. Use FTP to access your site. See How to Use FTP for information on how to use your ftp account to access your files
  3. Navigate to the httpdocs folder
  4. Select the .htaccess file and drag it to your local machine
  5. Make a copy, then modify the file as needed to resolve the issue you are working through
  6. To send the updated file back to your server, drag the modified version to the httpdocs folder
  1. Log into your Control Panel
  2. In the Subscriptions tab, click on your domain
  3. Click on Websites and Domains tab and click Show More at the bottom of the page
  4. Click the icon for File Manager
  5. Click on the httpdocs directory on the left
  6. Click on your .htaccess
  7. To edit your .htaccess, click Edit in Text Editor or Edit in Code Editor
  8. When you have finished editing it, click on Save
  1. Login to your server via SSH
  2. To access the .htaccess file for a specific site use the following command:
    cd /var/www/vhosts/<insert domain name>/httpdocs
    
  3. The following command will ensure that you have a backup of your .htaccess file:
    cp .htaccess .htaccess.bak
    
  4. To edit your .htaccess file run the command below:
    nano .htaccess
    
     
 
 

Add Feedback