Have you tried temporarily removing that file (index.php) from your custom directory to see if the problem persists? If it doesn't, you've made an editing error somewhere.