On Thu, 14 Mar 2013 23:37:40 -0700, <vita...@yourcmc.ru> wrote:

Thanks for answering!
But wasn't all that possible with just using something like $wgActionPaths?

$wgActionPaths only support actions. And actions are a very old, legacy, and frankly dying out thing. Practically every feature is now done with special pages which were previously not eligible for special url handling.


And what is the point of making "pretty urls" in case of MediaWiki?
I think they're already pretty much pretty in MediaWiki :)
/edit/$1 is slightly prettier than ?action=edit, but as I understand it doesn't affect anything, even like SEO.
And I don't think /help/$1 is any better than /Help:$1 at all...

You may not think /help/Foo is nicer than /wiki/Help:Foo but there is undoubtedly some wiki that would like to have something like /user/Foo, /forum/..., or say /product/Foo. PathRouter also supports things more complex than something simple like what that one extension does. The ShortUrl extension actually even uses PathRouter to support /s/xyz style short urls to pages on the wiki (very useful on foreign wikis where urls usually look something like "/wiki/%E3%82%A6%E3%82%A3%E3%82%AD%E3%83%9A%E3%83%87%E3%82%A3%E3%82%A2"). A good deal of it is about having the control to implement whatever fits the situation you are in best.


Unmangled PATH_INFO allows for a single rewrite rule like (.*) -> index.php/$1 to and you won't need to strip base from URIs (yet of course it's not hard)

index.php/$1 is a bad way to do rewrites. It is only fully supported by Apache+mod_php. It doesn't work on other webservers. And it also breaks in some of the cgi/fcgi Apache setups. While on the other hand piping everything to index.php and using REQUEST_URI to determine what to do works on every webserver, in every setup (ok if your host didn't let you any where near any sort of config, 404, or rewrite control it wouldn't work, but neither would /wiki/$1). It also gives us better control over the url handling and makes the possibility of configuring short/pretty urls by GUI/installer in the future much more feasible.


And you say PATH_INFO is unavailable on some configurations - can you please clarify what are these configurations?

I never said that PATH_INFO was unavailable. I said it's unused. At this stage I have yet to see a webserver that does not output REQUEST_URI. Our code is written such that PATH_INFO is only used when REQUEST_URI is not given. That means that for all of those webservers the branch of code we have handling PATH_INFO is never actually run. We could probably throw a fatal error into that section of code and have absolutely no one notice. Heck, that code could legitimately bit rot, be broken for years, and it never be realized. Hence I'd like to make it disappear.


--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to