Hello, good afternoon.
Recently I hired linux hosting. My site uses the Slim Framework, but I am not getting access to its routes when it is in production, but at localhost xampp, it was working normally.
Slim Routes for testing (not getting into any)
$app->group("/teste", function() {
$this->get("/", function(Request $request, Response $response, $args = []) {
return $response->write("deu");
});
$this->get("/:nome", function(Request $request, Response $response, $args = []) {
return $response->write("deu ".$args['nome']);
});
});
My question is whether .htaccess is correct.
Located in public_html / slim / library /
Here is the index.php (from the slim) and the .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
I tested different .htaccess codes sometimes giving error 404 and others error 500. Currently as above code, it gives error 500.
What if I need to create an httpd.conf file and enable AllowOverride All. And how can I do that?
You can see in the image with the project directory, the / etc / folder only has 2 files and a subfolder with the site name, which is empty too.
Could anyone help me?