How to detect mod_rewrite without apache_get_modules ()?

Is it possible to detect mod_rewritein PHP when a function is apache_get_modules()not available?

+3
source share
1 answer

You can analyze the output phpinfo():

ob_start();
phpinfo(INFO_MODULES);
$contents = ob_get_contents();
ob_end_clean();
var_dump(strpos($contents, 'mod_rewrite') !== false);
+7
source

Source: https://habr.com/ru/post/1715553/


All Articles