Created
November 14, 2016 20:33
-
-
Save DawTaylor/f00251482b8e9fb6e3dd4e671c13f248 to your computer and use it in GitHub Desktop.
Acts like an .htaccess that redirects all requests to index.php (WP and CI like)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', $_SERVER["REQUEST_URI"])) { | |
return false; | |
} else { | |
$_GET['q'] = $_SERVER['REQUEST_URI']; | |
include __DIR__ . '/index.php'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment