Checking if mod_rewrite module exists on apache

mod_rewrite is a great Apache modules that helps in rewriting URLs. It has been extensively used for pretty  URLs. So, before we get writing php project, its better to check if more_rewrite exists in the Apache Web Server we are running. To do this, here is a small snippet of php that can be used to check if mod_rewrite is enabled or not on your Apache server.
<?php
$mods= apache_get_modules();
if(in_array('mod_rewrite', apache_get_modules())==1){
echo "mod_rewrite exist ";
}else{
echo "mode_rewrite module doesn't exist";
}
?>

Comments

Popular posts from this blog

Automate file upload in Selenium IDE

How To Install and Configure Nextcloud