Welcome! Log In Create A New Profile

Advanced

Re: rewrite rule: MediaWiki to static site

August 20, 2018 04:10PM
Francis Daly Wrote:

> In this case, it looks to me that you can probably "return" rather
> than
> "rewrite", since everything should probably be a http redirect.
> non-Mediawiki URL

> [...] Except I would have the config be not a lot more than
>
> location = /wiki/index.php { return 301
> https://example.net/$my_static_wiki; }

> map $arg_title $my_static_wiki {
> default ""; # or whatever
> en/Main_Page MainPage;
> Glossary Glossary;
> Category:Troubleshooting Troubleshooting;
> }
>
> Make that map (http://nginx.org/r/map) be as big as you like. And you
> can
> "include" an external file if you find that easier.

> Good luck with it,

Hello Francis -- thank you very much, that worked perfectly.

The length of the `map` list meant I had to increase `map_hash_bucket_size` to `128`, but everything works as you described.

with very best regards, and my heartfelt thanks;

Pete
Subject Author Posted

rewrite rule: MediaWiki to static site

petecooper August 20, 2018 06:09AM

Re: rewrite rule: MediaWiki to static site

Francis Daly August 20, 2018 07:30AM

Re: rewrite rule: MediaWiki to static site

petecooper August 20, 2018 04:10PM

Re: rewrite rule: MediaWiki to static site

jeffdyke August 20, 2018 06:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
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