Hi,
I've found this great CMS and walked through several tutorials but i haven't understood how to prevent access to my child pages and set a redirect.
My page structure looks like this:
Home
|- Landing page
|- Breadcrumb
|- Image Text
|- Template 1
|- Template n
|- Products
How can i handle the access to the child pages of the 'Landing page'? In this case, i would like to prevent the access to them and automatically redirect to the parent page (Landing page) if one of these pages are opened in the Browser.
localhost/project/landing-page/breadcrumb/ -> should redirect to localhost/project/landing-page/
localhost/project/landing-page/image-text/ -> should redirect to localhost/project/landing-page/
I've added the following code on top of my template PHP files but it doesn't work:
<?php
$session->redirect("/landing-page/");
?>
I haven't tried it but also found that: http://modules.processwire.com/modules/process-redirects/
Is that the right way to handle redirects or is there a better solution out there to do that?
Thanks in advance for your help.