Base de conhecimento
1000 perguntas frequentes, 500 tutoriais e vídeos explicativos. Aqui, você encontra apenas soluções!
Create and use a .htaccess and .user.ini file
Atualização 26/05/2026
This guide provides basic instructions for creating and using a .htaccess and .user.ini file with an Infomaniak Web Hosting account.
Introduction
- A
.htaccessfile is placed in the root directory of a website and allows you to configure the Apache HTTP server.- As a decentralized configuration file, it offers significant flexibility to adjust the server's behavior according to the specific needs of the site.
- This file allows you to define URL rewrite rules, impose access restrictions, manage HTTP errors, and even customize security aspects such as disabling the display of files/folders.
- It also facilitates the implementation of redirects and aliases, providing precise control over the organization and accessibility of the site.
- A
.user.inifile allows you to customize the PHP directives for the folder (and its subfolders) in which it is located.- By acting at the PHP interpreter level, this file allows you to define specific configurations for a given folder and its subdirectories.
- Thanks to its clear syntax, it offers the possibility of modifying various parameters such as the memory limit, the script execution time, error handling, and other PHP-related directives.
- This granular approach allows developers to finely customize the behavior of PHP according to the specific requirements of each section of the site.
Create a file…
… .htaccess
- Connect to your hosting account via FTP or SSH.
- In the root directory of the website in question, create a new file and name it as follows:
.htaccess. - Enter the desired directives in the file; refer to this other guide, for example.
… .user.ini
- Connect to your hosting via FTP or SSH.
- In the desired location, create a new file and name it as follows:
.user.ini. - Enter the desired PHP configuration settings in the file.
Modifying the .user.ini file takes several minutes to take effect.
Link para esta FAQ: https://faq.infomaniak.com/2210
Esta seção de perguntas frequentes foi útil?