Dashboard > Atlassian Plugins > ... > Plugins > Redirection Plugin
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  Redirection Plugin

Added by david , last edited by David Peterson on Mar 15, 2007  (view change)
Labels: 


Does anyone know of a way (e.g. using Velocity/etc) to determine whether or not a user arrived at a page from a redirect as opposed to a direct link?

Basically what I want to do is add something to the page decorator that only displays if a user followed a redirect... e.g. "Redirected from Example Page", etc.

There's nothing I can think of specifically. Theoretically, the macro could add a parameter to the URL which another macro could check for, but currently there is no facility for this.

One possible idea I can think of is perhaps this information could be read from the User History? Do you know of any way to read the last couple of items from a user's History? It must be possible somehow given that Confluence renders the list via the 'History' link...

You probably could access the user history from somewhere (I've never tried, but it wouldn't be that hard, I assume). However, you would not be able to tell from the history whether the user had been redirected or had simply viewed the page then clicked on a regular link to get to the page. The only way to tell the difference between a true automatic redirection and a user-driven click-through is if the redirection process advertises the fact somehow.



Updated by David Dembo
Oct 29, 2007 10:22

Yeah, it definitely wouldn't be an exact science... my line of thinking was that if a page followed a redirect, most of the time you could assume that the 2nd item from the top of their user history would be the page that redirected them. If you could then check the body for .*{redirect\:.* you'd be in business.

Advertising the redirect would definitely be preferred (maybe &fromID=123456 appended to the URL or something along those lines?). I might log a feature request.

Edit - Logged as REDIR-18.
FYI on a completely unrelated note - there seems to be something funky wrong with the page layout when you edit a comment... between this edit box and your comment, it says "com.atlassian.confluence.pages.actions.ViewPageAction@1587a97".

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators