[RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

classic Classic list List threaded Threaded
51 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
Hi,

while tinkering with a RESTful content API I was reminded of an old pet
peeve of mine: The URLs we use in Wikimedia projects are relatively long
and ugly. I believe that we now have the ability to clean this up if we
want to.

It would be nice to

* drop the /wiki/ prefix
  https://en.wikipedia.org/Foo instead of
  https://en.wikipedia.org/wiki/Foo

* use simple action urls
  https://en.wikipedia.org/Foo?action=history instead of
  https://en.wikipedia.org/w/index.php?title=Foo&action=history

The details of this proposal are discussed in the following RFC:

https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs

I'm looking forward to your input!

Gabriel

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Tyler Romeo
On Mon, Sep 16, 2013 at 6:12 PM, Gabriel Wicke <[hidden email]> wrote:

> * drop the /wiki/ prefix
>   https://en.wikipedia.org/Foo instead of
>   https://en.wikipedia.org/wiki/Foo
>

Where would we put the API entry point? It can't be at
https://en.wikipedia.org/w/api.php because there might be an article named
"w/api.php".


> * use simple action urls
>   https://en.wikipedia.org/Foo?action=history instead of
>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>

This already works.

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | [hidden email]
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Ryan Lane-2
In reply to this post by Gabriel Wicke-3
On Mon, Sep 16, 2013 at 3:12 PM, Gabriel Wicke <[hidden email]> wrote:

> Hi,
>
> while tinkering with a RESTful content API I was reminded of an old pet
> peeve of mine: The URLs we use in Wikimedia projects are relatively long
> and ugly. I believe that we now have the ability to clean this up if we
> want to.
>
> It would be nice to
>
> * drop the /wiki/ prefix
>   https://en.wikipedia.org/Foo instead of
>   https://en.wikipedia.org/wiki/Foo
>
> * use simple action urls
>   https://en.wikipedia.org/Foo?action=history instead of
>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>
> The details of this proposal are discussed in the following RFC:
>
> https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs
>
> I'm looking forward to your input!
>
>
<
https://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage_title
>

"*Warning:* this method may create an unstable URL structure and leave some
page names unusable on your wiki. See Manual:Wiki in site root
directory<https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory>.
Please see the article Cool URIs don't
change<http://www.w3.org/Provider/Style/URI>and take a few minutes to
devise a stable URL structure for your web site
before hopping willy-nilly into rewrites into the URL root."

- Ryan
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Chad
In reply to this post by Gabriel Wicke-3
On Mon, Sep 16, 2013 at 3:12 PM, Gabriel Wicke <[hidden email]> wrote:

> Hi,
>
> while tinkering with a RESTful content API I was reminded of an old pet
> peeve of mine: The URLs we use in Wikimedia projects are relatively long
> and ugly. I believe that we now have the ability to clean this up if we
> want to.
>
> It would be nice to
>
> * drop the /wiki/ prefix
>   https://en.wikipedia.org/Foo instead of
>   https://en.wikipedia.org/wiki/Foo
>
> * use simple action urls
>   https://en.wikipedia.org/Foo?action=history instead of
>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>
> The details of this proposal are discussed in the following RFC:
>
> https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs
>
> I'm looking forward to your input!
>
>
Even better would be getting rid of action urls entirely.

-Chad
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
In reply to this post by Tyler Romeo
On 09/16/2013 03:21 PM, Tyler Romeo wrote:

> On Mon, Sep 16, 2013 at 6:12 PM, Gabriel Wicke <[hidden email]> wrote:
>
>> * drop the /wiki/ prefix
>>   https://en.wikipedia.org/Foo instead of
>>   https://en.wikipedia.org/wiki/Foo
>>
>
> Where would we put the API entry point? It can't be at
> https://en.wikipedia.org/w/api.php because there might be an article named
> "w/api.php".

There *might* be, in theory. In practice I doubt that there are any
articles starting with 'w/'. To avoid future conflicts, we should
probably prefix private paths with an underscore as titles cannot start
with it (and REST APIs often use it for special resources).

>> * use simple action urls
>>   https://en.wikipedia.org/Foo?action=history instead of
>>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>>
>
> This already works.


Both parts of the proposal have been working for a long time. The RFC is
mainly about using the capability in Wikimedia projects.

Gabriel

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

MZMcBride-2
In reply to this post by Chad
Chad wrote:

>On Mon, Sep 16, 2013 at 3:12 PM, Gabriel Wicke <[hidden email]>
>wrote:
>> It would be nice to
>>
>> * drop the /wiki/ prefix
>>   https://en.wikipedia.org/Foo instead of
>>   https://en.wikipedia.org/wiki/Foo
>>
>> * use simple action urls
>>   https://en.wikipedia.org/Foo?action=history instead of
>>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>>
>> The details of this proposal are discussed in the following RFC:
>>
>> https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs
>
>Even better would be getting rid of action urls entirely.

In favor of what? Special page URLs?

A variant on https://en.wikipedia.org/Foo?action=history is
https://en.wikipedia.org/history/Foo (using $wgActionPaths).

The RFC currently seems to gloss over what problem is attempting to be
solved here and what benefits a new URL structure might bring. I'd like to
see a clearer statement of a problem and benefits to a switch, taking into
account, for example, the overarching goal of making URLs fully localized.

MZMcBride



_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Tyler Romeo
In reply to this post by Gabriel Wicke-3
On Mon, Sep 16, 2013 at 6:34 PM, Gabriel Wicke <[hidden email]> wrote:

> There *might* be, in theory. In practice I doubt that there are any
> articles starting with 'w/'. To avoid future conflicts, we should
> probably prefix private paths with an underscore as titles cannot start
> with it (and REST APIs often use it for special resources).
>

When talking about URI design and REST, it has nothing to do with
functionality, but with organization and logical design. In URIs, the path
part of the URI is considered a hierarchical structure. It doesn't make
sense for api.php to be a sub-resource of the wiki itself. Even doing some
sort of underscore design wouldn't make sense, because you're implying that
the _images/ resource is the same level sub-resource as a normal article.

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | [hidden email]
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Petr Onderka
In reply to this post by Gabriel Wicke-3
On Tue, Sep 17, 2013 at 12:34 AM, Gabriel Wicke <[hidden email]> wrote:
> In practice I doubt that there are any articles starting with 'w/'.

Actually, there are. Looking at enwiktionary only, there are 10 pages
starting with "w/".
Some of those are redirects (e.g "w/r/t"), but others are normal
articles (e.g. "w/", "w/e").

Petr Onderka
[[en:User:Svick]]

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Jay Ashworth-2
In reply to this post by MZMcBride-2
----- Original Message -----
> From: "MZMcBride" <[hidden email]>

> The RFC currently seems to gloss over what problem is attempting to be
> solved here and what benefits a new URL structure might bring. I'd like to
> see a clearer statement of a problem and benefits to a switch, taking
> into account, for example, the overarching goal of making URLs fully
> localized.

Concur, especially in light of the face that *this does not permit you to
break the old URLs*.  They are everywhere, *and they must continue to work
forever*.

I hope I don't even have to justify why.

Cheers,
-- jra
--
Jay R. Ashworth                  Baylink                       [hidden email]
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com         2000 Land Rover DII
St Petersburg FL USA               #natog                      +1 727 647 1274

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Brian Wolff
In reply to this post by Gabriel Wicke-3
On 2013-09-16 7:12 PM, "Gabriel Wicke" <[hidden email]> wrote:

>
> Hi,
>
> while tinkering with a RESTful content API I was reminded of an old pet
> peeve of mine: The URLs we use in Wikimedia projects are relatively long
> and ugly. I believe that we now have the ability to clean this up if we
> want to.
>
> It would be nice to
>
> * drop the /wiki/ prefix
>   https://en.wikipedia.org/Foo instead of
>   https://en.wikipedia.org/wiki/Foo
>
> * use simple action urls
>   https://en.wikipedia.org/Foo?action=history instead of
>   https://en.wikipedia.org/w/index.php?title=Foo&action=history
>
> The details of this proposal are discussed in the following RFC:
>
>
>
> I'm looking forward to your input!
>
> Gabriel
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Well I'm not particularly fond of this idea (probably because im stuck in
my ways more than anything else), I do think that making the
en.wikipedia.org/foo be an instant http redirect instead of "did you
mean/redirecting in 5 seconds" message we currently have might make sense.

Additionally there is some security issues in ie6 when doing foo?action=raw
if I recall.

-bawolff
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
In reply to this post by Ryan Lane-2
On 09/16/2013 03:25 PM, Ryan Lane wrote:

> https://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage_title
>>
>
> "*Warning:* this method may create an unstable URL structure and leave some
> page names unusable on your wiki. See Manual:Wiki in site root
> directory<https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory>.
> Please see the article Cool URIs don't
> change<http://www.w3.org/Provider/Style/URI>and take a few minutes to
> devise a stable URL structure for your web site
> before hopping willy-nilly into rewrites into the URL root."

That is a very vague warning. So far I have lower-case 'favicon.ico',
'robots.txt' and 'w/' as potential conflicts. Do you see any others?

In general, I see removing /wiki/ as the less important part of the RFC.
Using sub-resources rather than the random switch to /w/index.php is
more important for caching (promotes deterministic URLs) and does not
seem to involve similar trade-offs.

Gabriel

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Ryan Lane-2
On Mon, Sep 16, 2013 at 4:41 PM, Gabriel Wicke <[hidden email]> wrote:

> On 09/16/2013 03:25 PM, Ryan Lane wrote:
> >
> https://www.mediawiki.org/wiki/Manual:Short_URL#URL_like_-_example.com.2FPage_title
> >>
> >
> > "*Warning:* this method may create an unstable URL structure and leave
> some
> > page names unusable on your wiki. See Manual:Wiki in site root
> > directory<
> https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory>.
> > Please see the article Cool URIs don't
> > change<http://www.w3.org/Provider/Style/URI>and take a few minutes to
> > devise a stable URL structure for your web site
> > before hopping willy-nilly into rewrites into the URL root."
>
> That is a very vague warning. So far I have lower-case 'favicon.ico',
> 'robots.txt' and 'w/' as potential conflicts. Do you see any others?
>
>
Any of the entry points? Any new entry point? Anything we ever want to put
into the root?

- Ryan
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
In reply to this post by Petr Onderka
On 09/16/2013 04:09 PM, Petr Onderka wrote:
> On Tue, Sep 17, 2013 at 12:34 AM, Gabriel Wicke <[hidden email]> wrote:
>> In practice I doubt that there are any articles starting with 'w/'.
>
> Actually, there are. Looking at enwiktionary only, there are 10 pages
> starting with "w/".
> Some of those are redirects (e.g "w/r/t"), but others are normal
> articles (e.g. "w/", "w/e").

Ah, ok. That would make it hard to keep /w/api.php working. /_w/api.php
would not suffer from that problem, but then current API users would break.

So I guess that kills the /wiki/ removal in the shorter term. Maybe we
should however consider using something like /_w/ if we ever introduce a
new API entry point to avoid conflicts with valid article names in the
future.

Gabriel

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Tyler Romeo
On Mon, Sep 16, 2013 at 7:51 PM, Gabriel Wicke <[hidden email]> wrote:

> Ah, ok. That would make it hard to keep /w/api.php working. /_w/api.php
> would not suffer from that problem, but then current API users would break.
>
> So I guess that kills the /wiki/ removal in the shorter term. Maybe we
> should however consider using something like /_w/ if we ever introduce a
> new API entry point to avoid conflicts with valid article names in the
> future.
>

I disagree. Having separate naming conventions for our entry points just
makes things more inconsistent. Also I don't think it's even necessary in
the first place to get rid of the /wiki/. It doesn't look messy at all.

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | [hidden email]
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Steven Walling
In reply to this post by MZMcBride-2
On Mon, Sep 16, 2013 at 3:36 PM, MZMcBride <[hidden email]> wrote:

> The RFC currently seems to gloss over what problem is attempting to be
> solved here and what benefits a new URL structure might bring. I'd like to
> see a clearer statement of a problem and benefits to a switch, taking into
> account, for example, the overarching goal of making URLs fully localized.
>

How about the following?

Our current URL structure is extremely obtuse for non-technical users, and
generally defies their expectations. To most people,
en.wikipedia.org/Dogor even
wikipedia.org/Dog should work just fine, not produce a 404.
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Tyler Romeo
On Mon, Sep 16, 2013 at 8:20 PM, Steven Walling <[hidden email]>wrote:

> Our current URL structure is extremely obtuse for non-technical users, and
> generally defies their expectations. To most people,
> en.wikipedia.org/Dogor even
> wikipedia.org/Dog should work just fine, not produce a 404.
>

To be fair, both of those links redirect to the proper URL anyway. It
wouldn't be hard to just change that from 404 to a redirect. Nonetheless
the canonical URI should still be /wiki/Article_title.

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
www.whizkidztech.com | [hidden email]
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Jay Ashworth-2
In reply to this post by Steven Walling
----- Original Message -----
> From: "Steven Walling" <[hidden email]>

> How about the following?
>
> Our current URL structure is extremely obtuse for non-technical users,
> and generally defies their expectations. To most people,
> en.wikipedia.org/Dogor even
> wikipedia.org/Dog should work just fine, not produce a 404.

Any collection of "most people" large enough to justify a change like this
is, I assert, too technically unsophisticated to be attempting to construct
URLs by hand (rather than by copy/pasta).

Do you propose to "fix" also the capitalization and spacing and URLescaping
rules, which are much more complicated than that?

My considered reaction, now after several hours, is that this is fixing
a problem which is not really broken for *anyone* except those who are
OCD about hiding the "tech-y" look in the Location box.  No offense. :-)

Cheers,
-- jra
--
Jay R. Ashworth                  Baylink                       [hidden email]
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com         2000 Land Rover DII
St Petersburg FL USA               #natog                      +1 727 647 1274

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
In reply to this post by Brian Wolff
On 09/16/2013 04:34 PM, Brian Wolff wrote:
> Additionally there is some security issues in ie6 when doing foo?action=raw
> if I recall.

Yes, IIRC some version of IE disregarded the Content-type header and
guessed the content type based on the URL and the content. If the URL
contained .php (only outside the query string?), it disabled this behavior.

Tim mentions in
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/49833#c3561 that
this only applied to IE3 and earlier, and IE4 respects the Content-type
header. As the market share of IE <= 3 is probably non-existent we could
probably blacklist it from logging in and content API access altogether.

According to [1] and [2] there is also a 'X-Content-Type-Options:
nosniff' header that disables this behavior for IE and Chrome. I doubt
that it works in IE3 though. Anybody up for some testing with an ancient
IE3 install?

Gabriel

[1]: http://msdn.microsoft.com/en-us/library/dd565661(v=vs.85).aspx
[2]: https://www.owasp.org/index.php/List_of_useful_HTTP_headers

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Gabriel Wicke-3
In reply to this post by Ryan Lane-2
On 09/16/2013 04:42 PM, Ryan Lane wrote:
> On Mon, Sep 16, 2013 at 4:41 PM, Gabriel Wicke <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     That is a very vague warning. So far I have lower-case 'favicon.ico',
>     'robots.txt' and 'w/' as potential conflicts. Do you see any others?
>
>
> Any of the entry points? Any new entry point? Anything we ever want to
> put into the root?


We should be able to avoid most conflicts by picking prefixed entry
points. However, as we can't drop the clashing /w/api.php any time soon
I have removed the /wiki/ part from the RFC:

https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs

So now only the conversion from

/w/index.php?title=foo?action=history
to
/foo?action=history

is under discussion.

Gabriel

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: [RFC]: Clean URLs- dropping /wiki/ and /w/index.php?title=..

Tim Starling-2
In reply to this post by Brian Wolff
On 17/09/13 09:34, Brian Wolff wrote:
> Well I'm not particularly fond of this idea (probably because im stuck in
> my ways more than anything else), I do think that making the
> en.wikipedia.org/foo be an instant http redirect instead of "did you
> mean/redirecting in 5 seconds" message we currently have might make sense.

The technical situation has not changed since that meta refresh was
introduced, and the same rationale still applies. See e.g.

February 2005:
<http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/15711>

August 2006:
<http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/25605>

-- Tim Starling


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
123