Hi,
I developed several slim applications (v3) and installed them on different servers, windows, linux (different release). I never had problems.
Now I installed on a new Ubuntu 18 server, Apache2, PHP 7.2 and I have problem with subfolder path.
This works:
$app->get('/', function (Request $request, Response $response, $args) {
return $response->withStatus(400)->write('DEMO :: Bad Request');
});
This not Works, Error 404
$app->get('/hello', function (Request $request, Response $response, $args) {
return $response->withStatus(400)->write('DEMO :: hello');});
I have a subfolder inside apache 2 root folder:
root-folder: /var/www/html
application-folder: /var/www/html/mgdlab-webgis/rest
this is my .htaccess file:
RewriteEngine On
Header Set Access-Control-Allow-Origin "*"
Header Set Access-Control-Allow-Headers "Accept,Content-Type,Access-Control-Allow-Headers"
Header Set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
Could you please help me to understand the problem? I read several posts similat to my issue but I can’t solve.
Thanks in advance
Luca