I was trying to follow the following question's answers to allow for overriding for the www folder: Codeigniter - getting 404 Not Found error
However, when I follow these steps the server starts giving me a 500 error after I enable AllowOverride. The following is the .htaccess file that I am trying to implement (I am following a guide since I am brand new to Apache)
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^api/([a-zA-Z_-]*)$ api.php?name=$1 [NC,L]
The guide that I am trying to follow is here: https://shareurcodes.com/blog/creating%20a%20simple%20rest%20api%20in%20php
Thanks!