Created
March 10, 2014 22:58
-
-
Save AramZS/9476215 to your computer and use it in GitHub Desktop.
For testing if mod_rewrite is enabled.
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 | |
?><!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