Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It is possible to have native HTTP redirects for pages moved or renames in Confluence?

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2013

It is possible to have native HTTP redirects for pages moved or renames in Confluence?

How?

One condition: this has to work by default, without having to ask the user to do somethign else after he moves or renames the page.

I was amazes to discored that this basic functionality was not a core feature by design.

2 answers

1 accepted

2 votes
Answer accepted
David Yu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2013

According to the docs, all links should update automatically when you move or rename a page. You just have to make sure your links are not web-links that start with http...use Confluence page links instead.

https://confluence.atlassian.com/display/DOC/Moving+a+Page

https://confluence.atlassian.com/display/DOC/Renaming+a+Page

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2013

I will test this myself. Still I do think that confluence should be smart enough to fix even web-links. We cannot assume that everyone will insert only internal links when writing wiki pages. I would not even consider this as an enhancement, just a bug.

Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2013

Sorin, I disagree with you... There should be no expectation that Confluence will keep external links updated.

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2013

I would be interested to find out why you disagree.

Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

Maybe we're not thinking of the same thing.

I'm thinking if you have, say, a link on a Confluence page to, say, a page on stackoverflow.com (let's use http://stackoverflow.com/questions/17227155/no-matter-what-i-do-i-cant-get-my-javascript-files-to-run-on-phonegap)... if that Stackoverflow page's link changes, then Confluence would have no way of knowing where the new URL is, unless the owners of Stackoverflow provided a redirect URL or some other info in the response to indicate the new location.

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2013

Shortly, Confluence should be able to detect 301 and 308 HTTP responses and correct the links inside the pages. Also, Confluence shold return 301 HTTP responses for pages that were moved or renamed. These are two different features but that by combining do solve the missing page problem in the correct way (the web way). The current behavioud of responding with 200 response and a page that is telling you that the content was moved is silly and denotes a clear lack of knowledge on how an web application is supposed to be implemented.

Sam Calder February 7, 2016

Ironically, clicking that very link posted earlier (https://confluence.atlassian.com/display/DOC/Moving+a+Page) now renders as a 404 because someone moved the page:

moving_a_page.PNG

  • Expecting Confluence to keep external/outbound links up-to date (via polling, prefetching, whatever) is achieveable. HTTP 301 requires the new URI for the resource in the response, so if the external resource is well-behaved then Confluence should be able to work with it. Personally I agree with Sorin, but I can also understand why some folks would make the argument that external URIs are out of scope.
  • Expecting Confluence to keep internal/inbound links up-to-date should be a given, and IMHO it is embarrassing that this is not the case. Even MediaWiki managed to make this work years ago. It shouldn't matter whether the link was created from raw html, or Confluence markup, or whatever. If it is rendered to the end-user as a link, it is a link. Confluence should be able to detect and maintain incoming links regardless of whatever format was used to input them. If it is a link within the same Confluence instance, there is no excuse for not redirecting properly.

Documentation in most organisations will exist in a continuous state of flux, and probably as a heterogeneous combination of emails / multiple wikis / documents on fileshares / links embedded in source code/comments / etc. etc... most of which will likely have static links, and these will grow increasingly stale as time passes. Having them return 404 for a moved Confluence resource harms the user-experience, and therefore (likely) also the adoption of Confluence. It's also contrary to RFC7231:

https://tools.ietf.org/html/rfc7231#section-6.4.2

0 votes
Ariel Lieberman July 11, 2020

I've added html macro to the page an put the below in

 

<!DOCTYPE html>
<html>
<body>

<h2>Redirect to a Webpage</h2>

<script>
  location.replace("link to the new location")
</script>

</body>
</html>
Long December 6, 2020

Unfortunately this is not native HTTP 301 redirect.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events