Mac OSX – Redirect .htaccess is not working ?

Here is the .htaccess file.


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mkyong/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mkyong/index.php [L]

# END WordPress


Find the Apache config file in /etc/apache2/httpd.conf, make sure the following settings are configured properly :

1. The is loaded.
2. In the Directory tag, update AllowOverride to all (default none)

sudo vim /etc/apache2/httpd.conf

# Make sure below module "" is loaded.
LoadModule rewrite_module libexec/apache2/
LoadModule php5_module libexec/apache2/
#LoadModule perl_module libexec/apache2/
LoadModule hfs_apple_module libexec/apache2/


DocumentRoot "/Library/WebServer/Documents"
<Directory "/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



  1. Apache – Mapping URLs to Filesystem Locations
  2. Apache HTTP Server Tutorial: .htaccess files

About the Author

author image
Founder of, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.


Leave a Reply

newest oldest most voted
Sohail Rahim
Sohail Rahim

Thanks. This worked for me


Hi, is there any way to get the latest posts through e-mail?
joining an email subscription?
Thanks in advance