Welcome! Log In Create A New Profile

Advanced

Re: How can I rewrite .php files properly?

Matthias Fechner
June 19, 2017 04:12PM
Am 19.06.2017 um 21:32 schrieb Joergi:
> 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;
> }
>
I use the following configuration snippet:
location / {
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}

location ^~ /maintenance/ {
return 403;
}

location ~ \.php?$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php-handler;
fastcgi_param HTTPS on;
}


Gruß
Matthias

--

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 98
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