Skip to content

Instantly share code, notes, and snippets.

@AramZS
Created March 10, 2014 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AramZS/9476215 to your computer and use it in GitHub Desktop.
Save AramZS/9476215 to your computer and use it in GitHub Desktop.
For testing if mod_rewrite is enabled.
<?php
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Check for mod_rewrite</title></head>
<body>
Test:
<?php //print_r(strpos(shell_exec('/usr/local/apache/bin/apachectl -l'), 'mod_rewrite') !== false); ?>
<p><?php // echo apache_get_version(),"</p><p>mod_rewrite $result";
phpinfo();
if( ! function_exists('apache_get_modules') ){ phpinfo(); die; }
$result = ' not available';
if(in_array('mod_rewrite',apache_get_modules())) $result = '
available';
?></p>
<p><?php echo 'PHP testing'; ?></p>
<p>Tester seq.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment