There was a problem loading the comments.

How to Edit Your .htaccess File

Support Portal  »  Knowledgebase  »  Viewing Article

How to Edit Your .htaccess File

Note: Making changes to your .htaccess file may cause issues with your current website if it is not configured correctly. Create a backup copy of the file before proceeding to make any changes.

 

Click here for cPanel instructions.

Click here for DirectAdmin instructions.

 

Follow these steps to edit your .htaccess file in cPanel:

 

1. Log in to your cPanel account.
For instructions on how to log in to your cPanel account, please click here.

e67bc52bc40656261a64477d109e88c36200cd6ec44572d26e421abce763aa4abd741ae6f2174bef?t=16a6aeb0a7b17c76830f158aac1b2d47

 

2. Under the Files section, click File Manager.

 fe4e94a3d2dcce54a67a988b1b3e61fa4ece387f0068caeb09becc7c4d33c286ef1d3b17ca975803?t=b9c4998a338e0c7341fa73dc4d22bf36


3. The cPanel File Manager will open in a new tab.
6ff54898853733e290a9f2762e1d88467d5db458e6fb72bd60a93f7eb7bb058c87cdf1c365329cd6?t=76242bc5e900d0df00e7956a813d9e37


4. Navigate to the directory where your .htaccess file is located. If you want to edit the .htaccess file of your root directory, navigate to the public_html folder.

You can access the edit function using two methods:

  • Right-click the file, then click Edit.
  • Select the file, then click Edit at the top of the page.

b527892c4fca6c7d8cc189d4679f18abf39410f3cb75c67200ade0d1db6d759af3c83e4b5a3b2083?t=be0d4cfd503d327ad751fe6d3911078a

 

5. An Edit window will open. Click the Edit button to open a new window with the contents of your .htaccess file.
5ec85af1fb24be52067db98becbe149521518fe656f45432e8672ee90dc043eb57c0fd1a37620ac8?t=9eb2552875c6c92cc87b9336a4feec91

6. Make changes to your .htaccess file, then click the Save Changes button.

6c49719cb6731d45d0fdb2f64db31e39b5f627c1e58d913297b4c5985a1c86e3181b377b7f9830e6?t=c6a644b18fcaa18f9a04e0041cc380db

 

 

Follow these steps to edit your .htaccess file in DirectAdmin:

 

1. Log in to your DirectAdmin account.
For instructions on how to log in to your DirectAdmin account, please click here.

93fa78453a69c8622e20602c56d427ffbc75b0d076fae439ca797766e8b0a04e417dcdf46c774d2d?t=edf763a81977cd2c9a4f74c2f4d2f115

 

2. Under System Info & Files, click File Manager.

e4adb8e8f2284c73f73377160d36ea377502e5dc5807292cf9457431b1900139590ab3791cb15236?t=88ca491853b0426bde899b068323a693

3. The DirectAdmin File Manager will open in a new tab.
316dca57fa1d666bd767b83a0950dfd1acebde527d43fdcc2b3a7e08bfbb9bd9de52c715adaa2e2f?t=2198e00fad905c7aa0c946ffd5ea18d5

 

4. Navigate to the directory where your .htaccess file is located. If you want to edit the .htaccess file of your root directory, navigate to the public_html folder.

You will be able to see the .htaccess file. If it does not exist, create a new one.

7ad6b976efa283c5090a5839bb915c895b9a8d0200d67e673d74bc16f56a3b926de4ce7d66463431?t=ee60097388a2d21da9b4b9487d64d287

 

5. Right-click the file, then click Edit.

ea200268ec368c86ea39ab0b09bf67f4091d44b7ff9cc2debec6744dd3853be90b7317f05f48511c?t=ade04b26fd05df07e0148ae2c324d78f

 

6. Make changes to your .htaccess file, then click the Save File button.

3919e6209168b32a952478c952c2efc27582b693a8dd077e507b05851205299765e22af84091b3f8?t=b56497e73d2f50c654e9df216c8663f9

Did you find this article useful?