#883 Fix MediaWiki to use 302s for redirects
Closed: Fixed None Opened 15 years ago by ianweller.

The Websites team has deemed that it might be a good idea for MediaWiki to actually redirect the browser to the new URL for a page upon a #REDIRECT [[Whatever]] in the wiki.

The way to do this would be to replace the necessary redirection code with whatever needs to happen to make a 302 occur, and go to the right place.

This would require patching MediaWiki at the least, and I'd recommend sending the patch upstream. I take a look at the code when I can, but often I don't have the time to do so. It might be good to talk with upstream and all the other necessary people to get this done.


By the way, I hate Trac's syntax.

heh. So here's the scoop on this. If its not something we can do with mediawiki configs in some way (IE: its supported) then its not worth us fixing it unless we work with upstream to patch it somehow.

My understanding is they can't support this because editing the page after its in redirect mode becomes difficult. (IE you can't get to it to edit it) I'd like independent verification though from someone else.

Yeah, we're going to need to patch it, from what we can tell.

I don't think that the problem with the redirection exists, as when you click the link to go back to the redirected-from page (I'm horrible at describing this sort of thing) the GET variable 'redirect' is passed with the value 'no'. Theoretically the PHP could detect this and decide not to send the 302 header.

not gonna be in done in time for F11, but will come up with a patch for upstream.

Look what I found (er, wrote)!

https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:HTTP302Found

It's in the process of being packaged. It's a damn good thing I can be certain of the license! ;)

FYI all, this is in Fedora and EPEL now. Someone should probably sanity check it.

What ever happened here? :)

I wrote the above extension and packaged it, but I have no clue if it's actually compatible with MediaWiki 1.16. I don't see why it wouldn't be, but I don't have the spare cycles to test it right now.

I will take over upstream and update it to MediaWiki 1.19 (current version), and re-package it soon.

The review request has been approved, and the update requested in Bodhi.

Update: https://admin.fedoraproject.org/updates/mediawiki119-HTTP302Found-2.0.1-2.el6

So, I guess the next step is to test this in stg and if everything works wait until the freeze is over and apply to production...

Seems to work here. ;)

This plugin has been moved to production.

nirik pointed me to this ticket. I really don't like this behaviour, and I explained why here:

https://fedorahosted.org/fedora-infrastructure/ticket/3525

Login to comment on this ticket.

Metadata