I have a web site which uses a template. Nearly all the content files are intended to be opened within the template, and without it they lack DOCTYPE, title,styling and JS files etc. It's all controlled from an index.php file in the root. Nothing unusual about that, I'd have thought, and it works perfectly well.
However recent attempts at improving SEO have led to a slew of errors in 'Webmaster Tools' resulting from Google attempting to open the files 'naked'.
I'm trying to work out why this is happening now (I've not knowingly had it happen before).
Meanwhile I'm looking for a way to force the files to open in the template. This would also deal with a visitor typing the actual URL of the file directly into his/her browser.
Is there a recommended way of doing this ?
As an alternative, I have found a way to force reversion to the home page instead (by testing for included files), but at present it has to be tailored for each page, which is not ideal.