redirect mechanism #233

Closed
jgm opened this Issue Jul 9, 2011 · 4 comments

Projects

None yet

1 participant

@jgm
Owner
jgm commented Jul 9, 2011
<b>Describe the feature or enhancement here.</b>

It would be nice if gitit supported some sort of redirect directive [watch
out for those redirect loops, :-)].

The reason why this is would be useful is that having redirects would give
us more "permission" to re-arrange things without worrying about users
looking for the information in the previous location.

Google Code Info:
Issue #: 90
Author: eric....@gmail.com
Created On: 2010-02-15T10:41:49.000Z
Closed On: 
Owner
jgm commented Jul 9, 2011

If you're running gitit behind apache, using mod_proxy (the usual method), why not
just set up the redirects in apache?

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2010-02-15T17:06:22.000Z

@jgm jgm was assigned Jul 9, 2011
Owner
jgm commented Jul 9, 2011

It's because it's not sufficiently convenient to do so (one way to think is in terms
of what's going to increase/decrease the probability that somebody casually editing
the wiki will actually make the minor change, or just give up and move on)

A stronger argument is that this means the person controlling the web server has to
be the one doing the redirects, whereas what we'd really want is for the person
modifying the wiki to do it.

Google Code Info:
Author: eric....@gmail.com
Created On: 2010-02-15T17:17:28.000Z

Owner
jgm commented Jul 9, 2011

So, what do you have in mind?
One possibility would be to add a metadata field:

redirect: OtherPage

But this is a bit awkward; it would be impossible to remove the redirect through the
web interface, because if you browsed to SomePage you'd immediately be shunted off te
OtherPage.

Google Code Info:
Author: fiddloso...@gmail.com
Created On: 2010-02-15T18:22:10.000Z

Owner
jgm commented Jul 9, 2011

I'm not really sure what the best way to go about this is. If I may think aloud...

One option may be not to do anything at all, and just output something like
"redirected to OtherPage". Perhaps then the meta-data field wouldn't be so useful,
since you could just write that by hand, unless of course, having a standard, pretty
redirect page is a good thing.

A second option might to have the page redirect after N seconds, (and tell you that
it will redirect you)

A third option, used by Mediawiki, is to just display the new page and link to the
original page (using some sort of flag to force it to ignore the redirect). I find
that a bit too subtle, personally, as what I see in my URL bar stays the same, and I
often do not realise I've been redirected.

A final option maybe is not to implement anything at all and just have a standard
posthook that runs whenever darcs mv is executed that creates a manual redirect page
(or maybe a script that post-processes the changelog and deals with darcs mv
accordingly).

Google Code Info:
Author: eric....@gmail.com
Created On: 2010-02-15T18:43:40.000Z

@jgm jgm pushed a commit that closed this issue Mar 30, 2014
@duairc duairc Added redirects to gitit (fixes #233)
You can now create redirect pages by adding the a "redirect" field to the metadata of a page. It works as follows:

 - When a user visits a redirect page, they are redirected to the destination page.

 - At the destination page, a message is displayed telling the user that they have been redirected from the source page. A link is provided back to the source page, with a parameter to disable the redirect (so that it can be edited).

 - Gitit will detects circular redirects and explain to the user what is going on in such cases.
85c89fa
@jgm jgm closed this in 85c89fa Mar 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment