Open Klaranth opened 3 years ago
Shall I assign @BuckarooBanzay to this?
Shall I assign @BuckarooBanzay to this?
You can, i'm sure he already did a deep-dive into http-redirects/rewrites and decided to do that another day :tm:
I think serving wiki by default if url did not match any known path for some other app would be good thing to do, then do 301 from index.php urls (first ofc make sure that redirect works correctly in all cases as these are locally cached).
Yes, it can prevent accessing some wiki pages if page name exactly matches some other known application url but I still think that better ux for wiki pages in general is a lot more important and there's no really that many possible conflicts.
Currently the wiki is on this url/route: https://pandorabox.io/index.php/Main_Page
Placing it in the root directory isn't really a choice i think, it would create more conflicts with the
other services (/map
, /webmail
, etc)
How about something like this: https://pandorabox.io/wiki/Main_Page
Or even this: https://pandorabox.io/w/Main_Page
The biggest pain would be to set up the redirects for the old urls afterwards (regex/rewrite stuff)
How about something like this: https://pandorabox.io/wiki/Main_Page
That's probably the best option, almost everyone calls it the wiki anyway :)
How about something like this: https://pandorabox.io/wiki/Main_Page
That's probably the best option, almost everyone calls it the wiki anyway :)
That's actually also how many other wiki sites do it out there (like wikipedia and mediawiki to name few).
Or even this: https://pandorabox.io/w/Main_Page
Also it seems that both mentioned sites have paths like this for direct access. For example https://en.wikipedia.org/w/index.php?title=Minetest / https://en.wikipedia.org/wiki/Minetest What I mean by direct access see difference between https://en.wikipedia.org/w/index.php and https://en.wikipedia.org/wiki/index.php
The biggest pain would be to set up the redirects for the old urls afterwards (regex/rewrite stuff)
You could probably just do local redirect basically /wiki/(.*) /real/index.php?title=$1
, let index.php be accessible like before and configure wiki to not add index.php for site links.
So no 301 redirects from proxy, just local server side redirects for /wiki/. That should make it a lot simpler because when link points directly to index.php it wont trigger local redirect at all.
Anyway probably good to add local redirect also for /w/index.php to real index.php wherever it really is, I think wiki will use /w/ links for URLs that need more complicated queries and that's probably actual reason why they have /w/ and /wiki/ (to avoid conflicts and allow unrestricted query strings).
edit. there seems to be official pretty good template for complete and exact (blocking some not-meant-for-everyone urls) requirements https://www.mediawiki.org/wiki/Manual:Short_URL/Nginx
Huhhila friendlyurls - Rip off .php from urls
SX Agreed, index.php really should not be there...