Created
March 2, 2011 19:45
-
-
Save thomas-p-wilson/851586 to your computer and use it in GitHub Desktop.
Determines whether or not mod_rewrite is working and enabled. Meant to be added to the index page of a site where all requests are redirected to the index page.
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(!isset($_GET['rewritecheck'])) { | |
$headers = get_headers(ROOT_URL.'/web/?rewritecheck',1); | |
define('REWRITE_ENABLED',strpos($headers[0],'301') !== false); | |
} | |
if(!defined('REWRITE_ENABLED')) {define('REWRITE_ENABLED',true);} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment