Redirect to a new page on 404 Error

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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

170 views 18 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you