Welcome! Log In Create A New Profile

Advanced

rewrite rule: MediaWiki to static site

August 20, 2018 06:09AM
Hello.
I'm diverting traffic from an retired MediaWiki site to an active static site. I'm somewhat confused with the process of `rewrite`-ing old URLs with a query string to standard URLs *without* a query string on the static site. For clarity, I do not need or want query strings on the new site.

Retired URLs examples:

https://example.com/wiki/index.php?title=en/Main_Page
https://example.com/wiki/index.php?title=Glossary
https://example.com/wiki/index.php?title=Category:Troubleshooting

New URLs examples:

https://example.net/MainPage
https://example.net/Glossary
https://example.net/Troubleshooting

All the retired URLs are attached to `/wiki/index.php` with a single query string.

There is no direct correlation between the old URLs and the new ones, and I have a before-and-after list of URLs to put into a 200+ entry `rewrite` list.

My question is two-fold:

1) Is it better (objectively) to have all the rewrite rules inside a `location` referring to `/wiki/index.php` since the only non-Mediawiki URL on the retired site is `/`?
2) How can I best build the `rewrite` list without using `if` or nested `map`?

I am grateful for your time and attention, and I would very much appreciate an example rewrite rule and/or some reading recommendations for `rewrite` with query strings.

Thank you.
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: 291
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