I am having some issues with .htaccess. The issue is that my RewriteRule seems to be invalid even though I have used the same exact one several times before. The .htaccess rules are:
RewriteEngine On RewriteRule api/(.*) api.php?method=$1 The issue is that when I visit my website, I get met with a 500 Internal Server error instantly. I tried editing the file to this:
Deny from all #RewriteEngine On #RewriteRule api/(.*) api.php?method=$1 and I got permission denied (Expected behavior), so everything should work? I have no idea what is wrong with my htaccess file. I have tried doing the following:
- Restart apache using service apache2 restart
- What I said above, try a simple rule that will work if everything is correct and comment out the rest
- Writing the same rule in another file and replacing the text in my .htaccess file with that (I read somewhere that there could be "invisible" characters that .htaccess did not like at all)