Base de conhecimento

1000 perguntas frequentes, 500 tutoriais e vídeos explicativos. Aqui, você encontra apenas soluções!

Using mod_rewrite

This guide explains how to configure URL rewrites on your hosting. The Apache "mod_rewrite" module is enabled by default on all Infomaniak infrastructures.

 

Management via the .htaccess file

For security and stability reasons, Infomaniak does not allow direct modification of the server configuration (VirtualHost).

Any customization must be done via a .htaccess file placed at the root of your site.

In a .htaccess file, the regular expressions of your rewrite rules should not start with a slash (/).

  

Correct syntax

Example: you should use RewriteRule ^contact$ contact.php (instead of RewriteRule ^/contact$ contact.php)…

It is recommended to add the directive RewriteBase / right after enabling the engine (RewriteEngine On) to ensure the compatibility of your relative paths.

Link para esta FAQ: https://faq.infomaniak.com/456


Esta seção de perguntas frequentes foi útil?