June 19, 2017 03:32PM
Hi guys,

I am running a MediaWiki installation and I am using this block of rules to rewrite requests to MediaWiki:

location ~ \.php {
root /home/$username/www/;
index index.php index.html;
try_files /dummy/$uri @php;

However, this is creating the problem that wiki pages, which end on .php can no longer be accessed. Instead, nginx only responds with "File not found."

What can I do to make all requests still go to MediaWiki, but to then let MediaWiki handle the actual paths?

E.g. a request to MyWikiPages/File.php should still be passed to MediaWiki, but then MediaWiki should display the according wiki page.


Subject Author Posted

How can I rewrite .php files properly?

Joergi June 19, 2017 03:32PM

Re: How can I rewrite .php files properly?

Matthias Fechner June 19, 2017 04:12PM

Re: How can I rewrite .php files properly?

Joergi June 23, 2017 05:19PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready