Welcome! Log In Create A New Profile


[MediaWiki] - Friendly URL's - (IF's are Bad)

Posted by qops1981 
[MediaWiki] - Friendly URL's - (IF's are Bad)
January 22, 2014 01:35PM
Hey All,

I am still rough around the edges with nginx, but I am getting better :-) I am trying to setup MediaWiki with Friendly URL's. I found this link on there site on how to do so with nginx: https://www.mediawiki.org/wiki/Manual:Short_URL/Page_title_-_nginx,_Root_Access,_PHP_as_a_CGI_module ... BUT you will note all of the IF's. Here is the code without needing to go to the link above:

location / {
if (!-e $request_filename) {
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
if ($uri ~* "\.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$") {
expires max;


location ~ \.php$ {
if (!-e $request_filename) {
return 404;
fastcgi_pass Etc. Etc. ...

Is there a better way to do this with try_files or something? If that has been talk about before, please feel free to link!

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready