Documentation

How to Use .htaccess

Introduction

The .htaccess file is a configuration file that can be used to modify the default parameters of an Apache web server. If such a file exists, it is read by the server before each web file access via the HTTP or HTTPS protocol. Note that several changes to .htaccess can be made without having to manually change the file, but by using the corresponding page in the cPanel (redirections, folder security, etc.).

Usage

You just need to create the file with Notepad or any other application that can write documents in pure text (not Microsoft Word) and save it with the name ".htaccess" (no quotation marks). You then need to transfer the file to the server via FTP or by using the cPanel's file manager. The .htaccess file must be placed in the folder containing the HTML/PHP/other pages you want it to affect. It is important to note that the .htaccess file will affect all files in the folder and its subfolders, unless another .htaccess file exists in that subfolder.

Contents and syntax

Here are some articles explaining the .htaccess file:

http://httpd.apache.org/docs/2.1/howto/htaccess.html

http://www.javascriptkit.com/howto/htaccess.shtml

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