Knowledge base
1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!
Use 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 an .htaccess file placed in the root directory of your site.
In a .htaccess file, the regular expressions in your rewrite rules must not start with a slash (/).
Correct syntax
Example: use RewriteRule ^contact$ contact.php (instead of RewriteRule ^/contact$ contact.php)...
It is recommended to add the RewriteBase / directive immediately after activating the engine (RewriteEngine On) to ensure the compatibility of your relative paths.
Link to this FAQ: https://faq.infomaniak.com/456
Has this FAQ been helpful?