In my mediawiki, I can link to internal PDFs using:
[[File:test.pdf]]
But if the user clicks the link, a single page for this file is opened like:
http://localhost/mediawiki/index.php/File:test.pdf
How can I achieve, that the PDF file is opened directly with no other pages in between needed?
You can use the Media:
pseudonamespace to link directly to the file:
[[Media:Test.pdf]]
This will link to:
http://localhost/wikimedia/images/d/d3/Test.pdf
The (slight) documentation about this is at: https://www.mediawiki.org/wiki/Help:Links#file-links