How to check whether mod_rewrite is enabled on server?

  1. Open your website root directory, create a php file mod_rewrite.php.
  2. Add the following line of code to it:
    <?php echo "Mod_rewrite is activated!"; ?>
  3. Create .htaccess file (rename the original file to .htacess_original if you have it).
  4. Add the following content to the file:
    RewriteEngine On
             RewriteRule ^.*$ mod_rewrite.php
  5. Open your site. If you see a message “Mod_rewrite is activated!”, it is enabled on your server. If you see anything else – mod_rewrite is disabled.
  6. Make sure to delete the .htaccess file you created and rename the original file back: