Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friendlier Wiki URLs #687

Open
Klaranth opened this issue Jun 25, 2021 · 7 comments
Open

Friendlier Wiki URLs #687

Klaranth opened this issue Jun 25, 2021 · 7 comments
Assignees

Comments

@Klaranth
Copy link

Huhhila
friendlyurls - Rip off .php from urls

SX
Agreed, index.php really should not be there...

@Klaranth
Copy link
Author

Shall I assign @BuckarooBanzay to this?

@BuckarooBanzay
Copy link
Contributor

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 ™️

@S-S-X
Copy link
Member

S-S-X commented Jun 26, 2021

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.

@OgelGames OgelGames transferred this issue from pandorabox-io/in-game Sep 15, 2021
@BuckarooBanzay
Copy link
Contributor

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)

@OgelGames
Copy link
Contributor

How about something like this: https://pandorabox.io/wiki/Main_Page

That's probably the best option, almost everyone calls it the wiki anyway :)

@S-S-X
Copy link
Member

S-S-X commented Sep 17, 2021

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

@S-S-X
Copy link
Member

S-S-X commented May 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants