Vérifier si le .htaccess est bien lu par Apache
Publié le 19/03/2012 PHP
<?php // Le .htaccess DOIT contenir la chaîne : // SetEnv ENV_HTACCESS_READING true if (array_key_exists ('ENV_HTACCESS_READING', $_SERVER)) { echo "Yes ! .htaccess is read and used !!\n"; } else { echo "BAD : The .htaccess is not read : add 'AllowOverride All' in your Apache configuration\n"; }
Si le fichier .htaccess contient la chaîne
SetEnv ENV_HTACCESS_READING trueet qu'il est bien lu, le message correct s'affiche. Sinon, on affiche qu'il faut activer "AllowOverride All"