Search code examples
php.htaccessslim

Slim PHP 500 Internal Server Error


I'm currently attempting to set up a Slim project with the following directory tree:

public_html
|-- Mini
|-- public
|-- vendor
|-- index.php (Slim)
|-- .htaccess

The document root is public_html, and the contents of the .htaccess are as follows:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

Despite this seemingly simple structure, I am unable to get anything other than a 500 Internal Server Error when trying to access the domain root or any subdirectories.

This all works on my local WAMP setup.

Any help would be much appreciated!


Solution

  • Solved!

    Issue was tantamount to permissions, and was resolved with the following:

    chmod -R u+rwX,go+rX,go-w /path

    Found at https://superuser.com/a/91966/334807