Thinly slice the tomatoes and layer in a colander to drain, sprinkling each layer with salt. Set aside while you prepare the other ingredients.
Add flour and salt to a food processor and pulse to combine. Cut butter into cubes and add to flour. Pulse until well combined. Sprinkle flour mixture with a couple more tablespoons of butter. Pulse until a dough forms, adding water one tablespoon at a time, if necessary. Remove dough from food processor. Shape into a ball, then flatten it into a disk. Cover dough in plastic wrap and refrigerate for 30 minutes.
Heat olive oil in a medium skillet over medium heat. Add onions and sauté until browned. Stir garlic into onions and cook until fragrant, about 30 seconds. Season with salt and remove from heat. Set aside to cool.
Take tomatoes out of colander and blot dry with paper towels.
Combine mayonnaise and 1/2 cup mozzarella cheese in a medium bowl.
Preheat oven to 400° F. Remove chilled dough from refrigerator and roll it out until it measures about 1/8 inch thick. Place the dough in a pie pan and trim any excess dough from the edges.
Cover bottom of pie with remaining 1/2 cup mozzarella cheese. Top mozzarella with onions. Place a layer of tomatoes over the onions and season with salt and pepper. Sprinkle half the feta over the tomatoes and cover the feta with half of the basil. Add another layer of tomatoes, salt, pepper, feta, and basil (in the same order). Cover the basil with a final layer of tomatoes, seasoned with salt and pepper. Spread the mayonnaise mixture over the top of the pie.
Place pie in oven and bake for about 25 minutes or until top of pie and crust are a deep golden brown. Let pie cool for about 10 minutes, then cut into wedges and serve. Enjoy!