Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
ENH: added mod rewrite detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Marion committed Feb 28, 2011
1 parent 6057bab commit 7c6ba24
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .htaccess
@@ -1,7 +1,9 @@
<IfModule mod_rewrite.c>
# Zend rewrite rules
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
</IfModule>

# Security: no folder fetching
Options -Indexes
Expand Down
12 changes: 12 additions & 0 deletions index.php
@@ -1,4 +1,16 @@
<?php

if (function_exists('apache_get_modules')) {
$modules = apache_get_modules();
$mod_rewrite = in_array('mod_rewrite', $modules);
} else {
$mod_rewrite = getenv('HTTP_MOD_REWRITE')=='On' ? true : false ;
}

if(!$mod_rewrite)
{
echo "Please install/enable the module rewrite";exit;
}
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'on');
set_include_path('.'
Expand Down

0 comments on commit 7c6ba24

Please sign in to comment.