Skip to content

Instantly share code, notes, and snippets.

@mikecastrodemaria
Created December 20, 2017 16:22
Show Gist options
  • Save mikecastrodemaria/97840d4791c94f13b6a3a10a40396429 to your computer and use it in GitHub Desktop.
Save mikecastrodemaria/97840d4791c94f13b6a3a10a40396429 to your computer and use it in GitHub Desktop.
A simple test to know if you apache mod_rewrite is loaded
<?php
if(!function_exists('apache_get_modules') ){ phpinfo(); exit; }
$res = 'Module Unavailable';
if(in_array('mod_rewrite',apache_get_modules()))
$res = 'Module Available';
?>
<html>
<head>
<title>A mod_rewrite availability check !</title></head>
<body>
<p><?php echo apache_get_version(),"</p><p>mod_rewrite $res"; ?></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment