Mac OSX - Redirect .htaccess funktioniert nicht?
Hier ist die.htaccess
-Datei.
/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
Lösung
Suchen Sie die Apache-Konfigurationsdatei in/etc/apache2/httpd.conf
und stellen Sie sicher, dass die folgenden Einstellungen ordnungsgemäß konfiguriert sind:
1. mod_rewrite.so
wird geladen.
2. Aktualisieren Sie im TagDirectory
AllowOverride
aufall
(Standard keine)
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 #...