Mac OSX - Redirect .htaccess ne fonctionne pas?
Voici le fichier.htaccess
.
/Library/WebServer/Documents/.htaccess
# BEGIN WordPressRewriteEngine On RewriteBase /example/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /example/index.php [L] # END WordPress
Solution
Recherchez le fichier de configuration Apache dans/etc/apache2/httpd.conf
, assurez-vous que les paramètres suivants sont correctement configurés:
1. Lemod_rewrite.so
est chargé.
2. Dans la baliseDirectory
, mettez à jourAllowOverride
versall
(aucun par défaut)
sudo vim /etc/apache2/httpd.conf
# Make sure below module "mod_rewrite.so" is loaded. LoadModule rewrite_module libexec/apache2/mod_rewrite.so LoadModule php5_module libexec/apache2/libphp5.so #LoadModule perl_module libexec/apache2/mod_perl.so LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so #... DocumentRoot "/Library/WebServer/Documents"#... # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride all #...