Always get 404 error in Slim Framework when omitting index.php in URL
If your htaccess file is in your /my_app
directory, change your rules to:
RewriteEngine OnRewriteBase /my_app/RewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [QSA,L]
If it's in your document root, you need to append the path:
RewriteRule ^ /my_app/index.php [QSA,L]
Can also change the .htaccess to the following: (I had a similar problem, and this solved it for me):
.htaccess:
RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]
if Jon Lin solution doesn't work, means your .htaccess file not working.you can verify that my adding a garbage line like
RewriteEngine OnRewriteBase /loop/v1/This is garbage lineRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^ index.php [QSA,L]
this will produce 503 error if .htaccess working fine, else you won't get any error.
if you didn't get any error , change Allow none to Allow all in Directory section of apache conf file or Httpd.conf