Go to main content

Txp die

Contents

Syntax

<txp:txp_die />

The txp_die tag is a single tag that will terminate normal page rendition and return the given status to the user agent (browser, search engine crawler, feed aggregator). An error page will also be returned to the user agent.

The status can be displayed by the error_status tag. A textual message can be associated with the error status and retrieved with the error_message tag. See also: @@Custom Error Pages@@.

Attributes

Tag will accept the following attributes (case-sensitive) as well as the global attributes :

msg="message"
Textual representation of the error condition.
status="number"
Numerical representation of the error condition.
Typical values: 301, 302, 304, 307, 401, 403, 404, 408, 410, 503, or any other valid status code.
Default: 503.
url="url" v4.5.0+
Redirects to the specified URL. Can be used with redirection statuses 301, 302 and 307.
Default: unset.

Examples

Example 1: Force a 404 ‘not found’ error

<txp:txp_die status="404" />

Example 2: Issue a permanent redirect

<txp:txp_die status="301" url="https://example.com/new/location" />

Genealogy

Version 4.5.0

url attribute added.

If you notice any kind of problem with this page’s construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)