Last modified: 2011-11-24 06:32:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18958, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16958 - Support for 404 trick for pretty URLs
Support for 404 trick for pretty URLs
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-10 16:36 UTC by Tom
Modified: 2011-11-24 06:32 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tom 2009-01-10 16:36:16 UTC
Hey,

I installed TightURL recently, and it's got a very interesting way to handle urls.  You can use mod_rewrite, of course, but it claims that is broken and that it's better to use the 404 trick.  Here's what you do:

ErrorDocument 404 /index.php

When you go to a url (like http://example.com/List_of_lists), it 404s, and passes that 404 to index.php which then properly displays the article List of lists.

This is a lot easier (especially for new users) than the other techniques listed on [[mw:Manual:Short_URL]].
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-08-25 13:09:24 UTC
I've thought for a while that we should ditch rewrites in favor of a 404 handler.  (Or, well, obviously we'd still support rewrites as well.)  It would probably allow significantly easier cross-web server setup, if there are no hitches.
Comment 2 Daniel Friesen 2011-11-24 06:32:07 UTC
Is there really anything we have to do in MW to support this?

Rewrite rules are just one type of configuration, they're the one everyone is used to using.
As long as MediaWiki gets a proper REQUEST_URI I believe that anything that maps your article path to index.php should work.

Just to note, I believe that not everyone can simply setup ErrorDocument. iirc there are some hosts that either make you use a separate config area just to setup error documents, and others that may simply not let you use ErrorDocument in your .htaccess or anywhere else.
Also, for /wiki/Foo style urls, rewrite rules have the advantage of not requiring an additional stat call to the filesystem.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links