I'm trying to figure out how Magento 2 is working. I've seen something that made me confuse.
Magento 2 have 2 possible root folder:
/path/to/magento2/index.php
/path/to/magento2/pub/index.php
One is at the absolute top level of Magento 2’s distribution folder. The second is inside the “pub” folder.
If I set base URL is either of them, magento is working perfectly.
Can anyone explain me why Magento 2 using 2 root folder like that ?
/pub/