New directory structure for WIki pages

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
New directory structure for WIki pages
by on (#39618)
I've changed the page structure for the wiki to be a little cleaner.

Instead of pages being at nesdevwiki.org/index.php/Foo, they will be at nesdevwiki.org/wiki/Foo. This matches the Wikipedia structure, and will be a little nicer to link or type.

I left a redirect for the old structure, so existing links should still work. Let me know if you find anything broken, or find some old links that don't work anymore.

by on (#39642)
Any reason it can't be nesdevwiki.org/Foo ? I always wonder why so many Wikis have seemingly unnecessary cruft between the domain name and the page name (/wiki/ is admittedly minimal).

by on (#39643)
if /foo/ NEEDS to exist, then I say /wiki/ should reside within it. Typing /wiki/foo/ really seems weird to me...

by on (#39651)
Huh? Maybe I was unclear, sorry. Instead of http://nesdevwiki.org/wiki/NES_CPU , why not just http://nesdevwiki.org/NES_CPU ? I don't do websites, so maybe there's some technical reason why the latter isn't practical. In my naive view, the mapping of a URL is entirely up to the web server, rather than having to directly correspond with any file structure or whatever, so in a sense it's like an API.

by on (#39666)
blargg wrote:
Any reason it can't be nesdevwiki.org/Foo ? I always wonder why so many Wikis have seemingly unnecessary cruft between the domain name and the page name (/wiki/ is admittedly minimal).


The /wiki is actually there for a reason.

/wiki/Foo doesn't exist on the server. All the wiki files live in /w/ and the main script is /w/index.php. The webserver rewrites the request to the actual page, which for /wiki/Foo is /w/index.php?title=Foo.

The issue with doing a redirect on the top level directory is you have to exclude a lot of files you don't want turned into wiki pages, like robots.txt or favicon.ico, and can run into weird problems if article titles clash with real file. By using a specific directory, you can rewrite everything.