Redirect to a new page on 404 Error

Anton Koldaev January 2, 2012

confluence-4.1(latest)
How to make a redirect to a new page(create page in current space with ${not found page} name) on 404 Error in Atlassian Confluence?

I think I need to change action in web.xml:

 <error-page> <error-code>404</error-code> <location>/fourohfour.action</location> </error-page> 

To something like:

 <error-page> <error-code>404</error-code> <location>/createpage.action?spaceKey=currentSpace&pageTitle=notfoundpagename</location>
 </error-page>
Could you please provide me a right syntax?

2 answers

0 votes
Anton Koldaev November 18, 2012
0 votes
Pat Macpherson November 14, 2012

A different solution to the larger problem is outlined here.

Rather than changing the 404 page, you could change your links to the format-

http://xxxxx/pages/createpage.action?spaceKey=experiment&title=this+does+not+exist&linkCreation=true&fromPageId=623770

such that-

  • If the page exists, user is redirected to that page.
  • If the page doesn't exist, user is able to create it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events