How to check whether mod_rewrite is enabled on server?
- Open your website root directory, create a php file mod_rewrite.php.
- Add the following line of code to it:
<?php echo "Mod_rewrite is activated!"; ?>
- Create . file (rename the original file to .htacess_original if you have it).
- Add the following content to the file:
RewriteEngine On RewriteRule ^.*$ mod_rewrite.php
- 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.
- Make sure to delete the .htaccess file you created and rename the original file back: