How to properly setup MAMP and XIP

Could this be resolved by a hosts file entry that always routed relevant host requests back to local host?