Hide a directory or asset from the front-end using Web Paths in Squiz Matrix

    Using Squiz Matrix, you might wish to hide or prevent a directory from being viewable to the public. All it takes is a quick couple of steps using Web Paths to hide the directory and its children.

    A prime example of this is if you have a folder inside a directory such as the example shown below:

    The front-end URL might be:


    http://www.domsammut.com/landing-page/sidebar/

    Now you don’t really want the sidebar folder to visible to the front-end user. To hide this folder you need to remove the Web Path for it.

    Removing the Web Path will make all the child assets become inaccessible via a URL.

    To remove the web path, right click on the folder and select Web Paths

    You should now see the the Web Paths dialog.

    From here, simply remove the text from the Paths field, leaving it blank

    Hit Commit down in the bottom right-hand corner.

    Your Web Paths dialog should now look like this:

    This folder is now no-longer viewable to front-end user and depending on your setup, should return a 404.

     

    This post was last modified on May 13, 2013 8:53 pm

    Dom Sammut: Dom Sammut is a PHP / Node.js Web Developer from Australia with extensive experience in developing in and customising Laravel, Express, VueJS, WordPress, Symphony CMS, Craft CMS and Squiz Matrix.
    Related Post