Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-03-22 12:52:54

geroldbraun
Member
Registered: 2010-01-19
Posts: 19
Website

if_status tag: is 403 a valid number?

I want to display a designed page, if someone runs into error 403. There is everything fine with error states 503 and 404. The page error_default will be displayed correctly. Now i added <txp:if_status status=“403”> in the same manner as i did it with 404 but the error_ default page will not show up.
Any hints please, where i might have failed?

addition: Textpattern-Version: 4.2.0 (r3275) in use

Last edited by geroldbraun (2010-03-22 12:56:05)


Smile, Breath, Go slowly – Thich Nhat Hanh

Offline

#2 2010-03-22 13:53:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: if_status tag: is 403 a valid number?

In which situation would TXP show or generate 403? Currently TXP itself automatically shows 403 only when:

  • IP has been banned.
  • Comments are closed but tried to sent.

TXP won’t display 403 as there isn’t a inbuild system that you can use to tag content with “forbidden”, and with real forbiddens it’s up to the server. Only way to show 403 is if you specifically kill the page with your own status code, like say with the 403 (for example <txp:txp_die status="403" />).

All error messages, except inbuild not founds (404) and generics (500/503, used by plugins and errors) will be usually handled by your server if TXP isn’t specifically told to show something.

Last edited by Gocom (2010-03-22 13:59:32)

Offline

#3 2010-03-22 16:06:07

geroldbraun
Member
Registered: 2010-01-19
Posts: 19
Website

Re: if_status tag: is 403 a valid number?

Thanx Gocom for your quick reply.

The case is as follows: there was a txp section with the name “lap” to wich i once linked (and a few of these links may still exist out there). Now i have renamed this section because it interlaced with a folder in my server-directory named “lap”.
If someone now calls http://www.geroldbraun.de/lap/ then 403 occurs. 403 is okay, because noone should access this directory with a browser. Albait i feel a little bit guilty for spreading links (to ../lap) that will land the visitor in 403-land.

It is a minor problem, if it is a problem at all. I wondered if 403 is a valid number for txp:if_status. And it is not, if i got your answer right, isn’t it?


Smile, Breath, Go slowly – Thich Nhat Hanh

Offline

Board footer

Powered by FluxBB