Multiple Custom 404 error messages

Michael Cooley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 20, 2019

I have a need that we want to shut down a site and direct people to another one. We want a message to pop up when someone tried to go to any page in that site. I was thinking about setting up a custom 404 error message for this site. I'v found how to update the general 404 error message but have not found any way to setup a custom 404 message just for the specific site. Is there a way to do this with a custom 404 message? Is there a better way to look at this problem?

Thank you,

Michael

1 answer

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2019

Confluence won't really support this.  You're running a web-service with Confluence that responds on the base-url and will continue to do so while it is running.  By definition, you can't get 404's because the pages Confluence is serving ARE there.

But there are some options.

Most of us will simply turn off Confluence.  You'll get a generic 404 then, rather than a nice useful one, so the cheap trick is to set up a web-server to listen on the base-url that Confluence was on, and serve up the 404 you want no matter what the users land on below there.

If, for some reason, you want to keep Confluence running, you can customise the "header" in the main look-and-feel, placing a javascript "redirect" to land the users whereever you want to push them to.

Finally, if by "site" you actually mean just "Space" (i.e only a part of your Confluence), I would restrict every page in the space so that the users get a "forbidden" and then use a similar trick to the one above on the home page for the space - there's a (free) App for "redirect macro" in the marketplace which enables you to stick a redirect on the home page (or, if you can be bothered to do a bit of scripting, add it to all the pages in the space!)

Michael Cooley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2019

Nic,

Thanks for the feedback, yes when I said Site i mean Space. I'll look into your suggestions for future requests. I'm just going to modify the default 404 message for the time being.

Regards,

Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events