I have a template group that I am using to store embeds like header and footer. I do not want people to be able to directly access those templates by going to www.domain.com/embeds/header. I want that to redirect to the 404 page. How do I go about this? Is there a way to block template groups from direct access? Would this be better done in .htaccess? Thanks for any help.
In versions of EE2 prior to 2.9 if you start the template name with a dot it will not be directly accessible.
In the just-released EE 2.9 you can specify a different character instead of dot and the default has been changed to underscore.
Documentation on this feature (currently describes 2.9 handling):
I don't believe EE has a mechanism for blocking direct access on the template-group level. If you needed that then you would probably want to do on the server level (.htaccess rewrites).