Check and enable mod_rewrite if htaccess not working

So, I faced this issue, ny htaccess was not working and my API was pathetically useless because of this.
So I decided to check this with my server.

Create a PHP file on the Apache server. Write the below code inside it.

<?php
phpinfo();
?>

Now call the file in your browser (This means, put the file URL in the browser and press ENTER).
Once done, you will see info about your php. Press Ctrl+F and search for “mod_rewrite”.
If present, then please do not read any further as your issue is then different from mine.
Continue reading “Check and enable mod_rewrite if htaccess not working”