How to check if “mod_rewrite” is active

From this tutorial you’ll learn how to check if mod_rewrite is active.

Checking “mod_rewrite”
  • First, let’s access your hosting server cPanel and navigate to the File Manager tool.
  • Here open your WordPress root directory.
  • Create the mod_rewrite.php file and open it for editing.
  • Add the following line of code to it.

https://gist.github.com/Shininglow/f87165a81355e7d4a4f54279c55b0d2f

  • Create the .htaccess file. If you have another .htaccess file, rename it, so you won’t lose it in the process and will be able to replace your newly created file with an old one.“mod_rewrite”
  • Add this code to your new .htaccess file.

https://gist.github.com/Shininglow/c795b91fe9b72389ad7d8e37bc16535b

  • Now you can open your browser and navigate to your website. You’ll see mod_rewrite is activated! message.
    If there is no such message, please, contact your hosting provider for the further assistance! 
  • After that, you’ll need to delete the .htaccess file. Replace it with your old .htaccess file.