How can we check if the website is using pub directory or not, independent of its mode?
Is there any Magento function present to check the root document?
directorymagento2static-content
How can we check if the website is using pub directory or not, independent of its mode?
Is there any Magento function present to check the root document?
Best Answer
And finally after many testing, I found the most relevant solution to handle this. Code is as below:
And now the pub directory can be checked by the condition