Search code examples
cakephpxml-sitemap

Cake php root directory file access


Hello community I want to Create custom sitemap in root/public_html directory and i want to view as raalic.us/sitemap.xml So how can i access root directory any file or specific file in cake php?


Solution

    • You have set the cakephp based web app to root/public_html
    • CakePHP has its own root directory and it is called webroot
    • .htaccess redirects all http requests to that directory
    • it contains publicly available files (css, js, img, ..)
    • you can put your sitemap.xml in it

    so the correct path to the xml file is: root/public_html/webroot/sitemap.xml