Site pages working again

My apologies that the fix I applied on 26 August was not tested properly as I realised now that only the home page was working. I have fixed it now and all pages should load fine again.