I have a “test.md” file on localhost.
Calling “localhost/test” or “localhost/test.md” in the browser both open the file. Why’s that?
Where is this configured?
This is a problem because it’s not consistent between my home Fedora-dev-server and my office windows-dev-server.
It also has impact on url-rewriting (that’s what I was struggling on for hours when I discovered this probable cause of my issues(*)).
Thanks in advance for your help !
(*) RewriteCond %{REQUEST_FILENAME} f finds files on one install and not on the other
Precision: it’s not only “.md”, I figured out I have the same behaviour for .txt, .html, .md
, but not for .ptk, .wxc or any random extensions (strangely, .xyz triggers a download…)
$ find /etc/httpd | xargs rpm -q -f | sort -u
httpd-2.4.68-1.fc44.x86_64
httpd-core-2.4.68-1.fc44.x86_64
httpd-filesystem-2.4.68-1.fc44.noarch
httpd-manual-2.4.68-1.fc44.noarch
le fichier /etc/httpd/conf.d/dev.loc.conf n'appartient à aucun paquet
le fichier /etc/httpd/conf.d/dox.loc.conf n'appartient à aucun paquet
mod_dnssd-0.6-36.fc44.x86_64
mod_http2-2.0.39-1.fc44.x86_64
mod_lua-2.4.68-1.fc44.x86_64
php-fpm-8.5.9-1.fc44.x86_64
Notice: dev.loc.conf and dox.loc.conf ==>
# Hôte virtuel par défaut
<VirtualHost *:80>
ServerName dev.loc
# Dossier contenant les pages
DocumentRoot /home/francis/dev/devphp/
<Directory /home/francis/dev/devphp/>
Order allow,deny
Allow from all
AllowOverride all
Require all granted
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
</VirtualHost>
Apparently, the download is triggered because of a mime-type I had never heard of. But the question is, upstream: why does Apache (or whatever else) resolve test4 to test4.xyz in the first place ?