Modifying existing .htaccess files

To modify/add directives to the .htaccess file in your public_html directory using "File Manager", follow these steps:

1. Log into your cPanel account.

2. Click on the "File Manager" icon.

3. Click on the folder icon next to "public_html".

4. Click on the file named ".htaccess".

5. In the left hand window click the "Edit File" link.

6. A second window should appear. Type or paste the code you wish to add into this second window.

7. Click the "Save" button.

 

  • 3 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

Disabling directory listings using .htaccess

By default when accessing any directory which does not contain an index file (ex:...

How to create a user-friendly URL using .htaccess?

If your website is using a long URL like example.com/files/folder/sitemap.html, you can change it...

How to redirect a page to another page or website using .htaccess?

If a page on your website no longer exists and you want to redirect it to your new page or...

Directory protection using .htaccess

One of the more common/popular uses of .htaccess is to password protect specific directories...

How do I re-direct non-https traffic to the https version of the website?

With the latest cPanel version, there is a 'Force HTTPS Redirect' option in the 'Domains' area....