I am trying to get the .htaccess
working in MAMP.
The content of the .htaccess
is a simple redirect line but it does not work. I am trying
In httpd.conf
on /Applications/MAMP/conf/apache
, find:
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
Replace None
with All
.
Restart MAMP servers.
I'm using MAMP (downloaded today) and had this problem also. The issue is with this version of the MAMP stack's default httpd.conf directive around line 370. Look at httpd.conf down at around line 370 and you will find:
<Directory "/Applications/MAMP/bin/mamp">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
You need to change: AllowOverride None To: AllowOverride All
Go to httpd.conf
on /Applications/MAMP/conf/apache
and see if the LoadModule rewrite_module modules/mod_rewrite.so
line is un-commented (without the # at the beginning)
and change these from ...
<VirtualHost *:80>
ServerName ...
DocumentRoot /....
</VirtualHost>
To this:
<VirtualHost *:80>
ServerAdmin ...
ServerName ...
DocumentRoot ...
<Directory ...>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory ...>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
If you have MAMP PRO you can set up a host like mysite.local, then add some options from the 'Advanced' panel in the main window. Just switch on the options 'Indexes' and 'MultiViews'. 'Includes' and 'FollowSymLinks' should already be checked.
The problem I was having with the rewrite is that some .htaccess files for Codeigniter, etc come with
RewriteBase /
Which doesn't seem to work in MAMP...at least for me.