In the directory where you plan to install Elgg, do the following:
RewriteEngine on RewriteRule ^testing.php$ modrewrite.php
This tells the webserver to load modrewrite.php when testing.php is requested.
In order to get this test to work on some virtual servers, you may need to add:
RewriteBase /prior to the RewriteRule line.
<?php echo "mod_rewrite works"; ?>
<?php echo "mod_rewrite does not work"; ?>
Now use your web browser to load testing.php. The text that shows will tell you whether mod_rewrite is working.