I had the same problem and hopefully this will solve it for you.
I added my site to my host file so that instead of going through locahost / ..... It had its own URL, which I redirected to 127.0.0.1. that is, my host file looked like this:
127.0.0.1 mysite.local
Then I set up a virtual host in MAMP. The vhosts.conf file can be found in / Applications / MAMP / conf / apache
My host file is as follows
NameVirtualHost * <VirtualHost *> DocumentRoot "/Applications/MAMP/htdocs" ServerName localhost </VirtualHost> <VirtualHost *> DocumentRoot "/Applications/MAMP/htdocs/mysite-folder" ServerName mysite.local </VirtualHost>
Hope this helps: D
source share