First, edit your hosts file.
$ sublime /etc/hostsAdd your new host, ie.
127.0.0.1 example.devEdit your (MAMP-) apache httpd.conf file
$ sublime /Applications/MAMP/conf/apache/httpd.confAnd add the new host
NameVirtualHost * (add this line just once)
<VirtualHost *>
DocumentRoot "/path/to/your/project/"
ServerName example.dev
</VirtualHost>Restart MAMP and you are good to go