You can easily find out in two ways whether rewrite_module configured in your server.
Login to your server through ssh and execute below command,
# httpd -M | grep rewrite_module
Syntax OK
rewrite_module (static)
Syntax OK
rewrite_module (static)
Another method is to check if mod_rewrite is enabled by PHP code,
Make a file and add the below code, it will be displaying configured apache modules on a page,
phpinfo.php
<?php
$test=print_r(shell_exec('/usr/local/apache/bin/httpd -l'), 'mod_rewrite');
echo '<pre> - ';print_r($test);echo '</pre>';
?>
$test=print_r(shell_exec('/usr/local/apache/bin/httpd -l'), 'mod_rewrite');
echo '<pre> - ';print_r($test);echo '</pre>';
?>
You will be getting an output:
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
...
mod_alias.c
mod_rewrite.c
mod_so.c
core.c
mod_authn_file.c
mod_authn_default.c
...
mod_alias.c
mod_rewrite.c
mod_so.c
Comments (0)