Description
Describe the bug...
Steps to reproduce
- Add a #redirect to a page
- Go to it. It will issue a "302 Found" instead of a "301 Moved Permanently". This is not desirable.
Example
Component selection
- general
Details
I see this in the code:
- def http_redirect(self, url):
- """ Redirect to a fully qualified, or server-rooted URL @param url: relative or absolute url, ascii using url encoding. """ url = self.getQualifiedURL(url) self.emit_http_headers(["Status: 302 Found", "Location: %s" % url])
Just change "302 Found" to "301 Moved Permanently" to fix.
MoinMoin Version |
1.8.5 |
OS and Version |
all |
Python Version |
all |
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
The problem here is that when pages move, and you use #redirect, if it issues a 301, search engines will know that links that point to the old page now effectively point to the new, and browsers may even update their bookmarks. Not so with a 302.
One problem is still remaining: The 301 redirect doesn't go to the correct page. For example: If you open http://www.jurawiki.de/ScheidungOnline , the HTTP header says
HTTP/1.1 301 Moved Permanently ... Location: http://www.jurawiki.de/action/show/OnlineScheidung?action=show&redirect=ScheidungOnline
This is not the URL of the new page. It should be http://www.jurawiki.de/OnlineScheidung
Plan
- Priority:
- Assigned to:
Status: using 301 for some cases, see http://hg.moinmo.in/moin/1.8/rev/ece8d64f8a57
There was some misbehaviour discovered later, so this "fix" had to get reverted, see there:
MoinMoinBugs/redirectsShouldBeTemporaryToPreventCaching