Version: 3.5.6 Reporter: James Catt —
This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
I have a template set up like so:
{exp:channel:entries channel="my_channel" url_title="{segment_3}" limit="1" status="open"}
{if no_results}
{redirect="404"}
{/if}
// rest of template
{/exp:channel:entries}
The 404 redirect works as expected when segment_3 doesn’t match the url_title for any entry in the system—it displays the 404 template I have selected in the system settings.
It doesn’t work, however, when entering a url for an entry that’s closed. In this case, Apache responds with a 404 response code/HTTP header, but there’s no response body. The result for the user thus varies depending on the browser (Chrome displays a default 404 message, whereas Safari just shows a blank page).
Just for the sake of clarity:
http://www.mysite.com/segment_1/segment_2/random-url-that-doesnt-have-an-entry –> displays 404 template as expected
http://www.mysite.com/segment_1/segment_2/url-for-a-closed-entry –> Apache returns 404 with no body
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```