In short, it only works if I put index.php in the URL. It looks like it's in .htaccess, but I do not know where. I would like to know which setting is incorrect or what I could do to find out my error.
Data: Debian (9) Apache / 2.4.25 (Debian) PHP 7.0.19-1
My .htaccess:
<IfModule mod.rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [NC, L]
</IfModule>
My index.php:
<?php
$url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
echo $url;
//tentativa diferente
$R = filter_input(INPUT_SERVER, 'REQUEST_URI');
echo $R
Terminal:
$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-10-28 12:30:05 -02; 1h 8min ago
Process: 768 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
$ a2enmod rewrite
Module rewrite already enabled