To test whether mod_rewrite is working, create a .htaccess file inside your webroot as follows:
RewriteEngine on
RewriteBase /
RewriteRule ^test.php$ rewrite.php
Create file test.php in the same directory with the following code:
echo 'mod_rewrite is not working';
Create file mod_rewrite.php in the same directory with the following code:
echo 'mod_rewrite is working';