Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-07 07:06:55

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

error_default: Convert to home page?

Hi,

Currently, if I type in an invalid address, I get the “error_default” template.

How can I set any errors (404’s etc) to land on home page?

Thanks!
Cheers,
Micky

Last edited by mhulse (2007-07-07 07:10:29)

Offline

#2 2007-07-07 07:11:13

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: error_default: Convert to home page?

Maybe with a header location or redirection in php or javascript.

Offline

#3 2007-07-07 07:16:06

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: error_default: Convert to home page?

Hi elwario91, thanks for your quick reply, I really appreciate the help. :)

Ahhh, a header redirect… that would make sense…. I can definitely do that.

I guess I was just wondering if there was a TXP way of doing that type of thing… I have not tried deleting my “error_default” template yet — I was kinda thinking that doing that would make my default index page the default error page. :D

Thanks for tip!
Cheers,
Micky

Offline

#4 2007-07-07 07:50:17

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: error_default: Convert to home page?

A redirect breaks the http response code – you get a 301/302 instead of a 404.

Deleting the error_deault page will revert to a built-in bare-bones error-page.

What you should do, is modify the error_default template to your liking, possible making it look more similar to the homepage – however make sure that you do enter the txp-tags for the error codes, otherwise debugging problems gets a lot more difficult. For example denied comments due to blacklist will show a 401 or some plugin might show a 503. And those errors will also be shown rendered with the error_ pages – error_401 etc. where available, error_default otherwise. So maybe you ut want to create and modify a error_404 and leave the default as it is. As you can see, there are many options…

Offline

#5 2007-07-07 08:08:37

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: error_default: Convert to home page?

Hi Sencer, thanks for the help, I greatly appreciate it. :)

Ahhhh, I see…. That makes a lot of sense.

I will opt to make the error page default look like how I need it to.

Thanks again!
Cheers,
Micky

Offline

Board footer

Powered by FluxBB