How to check mod_rewrite is enabled or not?

How to check mod_rewrite

Five simple steps to cross verify “mod_rewrite” is enabled or not on your website hosted server.

  • Login into your website web hosting control panel or in server and create file mod-rewrite-test.php file under your website root directory i.e. public_html with following code                         

<?php echo “Great! Mod_rewrite is active for your website!”; ?>

  • Create .htaccess file and if already .htaccess file is present than take a backup the original file to .htacess-ori.
  • Add following code in a .htaccess file.

RewriteEngine On
RewriteRule ^.*$ mod-rewrite-test.php

  • Browse the website

  • If you see a message “Great! Mod_rewrite is active for your website!”, it is enabled on your server. If you see anything else it means mod_rewrite is disabled and you need to enable it or ask your web hosting provider to enable it. On #KTCHost server by default mod_rewrite is enabled, if you required any help than kindly contact our Live chat support available on our website and discuss your issue with us.
About Anant 373 Articles
Senior technical writer