Skip to content

Instantly share code, notes, and snippets.

@renan
Created September 16, 2013 12:09
Show Gist options
  • Save renan/6579909 to your computer and use it in GitHub Desktop.
Save renan/6579909 to your computer and use it in GitHub Desktop.
diff --git a/webroot/index.php b/webroot/index.php
index 6c071ac..f77be14 100644
--- a/webroot/index.php
+++ b/webroot/index.php
@@ -22,6 +22,10 @@
// for built-in server
if (php_sapi_name() === 'cli-server') {
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
+
+ if (file_exists(__DIR__ . $_SERVER['REQUEST_URI'])) {
+ return false;
+ }
}
require dirname(__DIR__) . '/App/Config/bootstrap.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment