Version: EE 2.0.0PB 20091202 Reporter: Dom Stubbs —
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
On my EE2 test installation (MAMP, Snow Leopard) the 404 redirect feature is not working correctly.
Test code 1:
{exp:channel:entries channel="news|about" limit="3" disable="categories|member_data|category_fields|pagination" require_entry="yes" status="open|featured"}
{if no_results}{redirect="404"}{/if}
<h4><a href="http://{comment_url_title_auto_path}">{title}</a> // {entry_date format="%F %d %Y"}</h4>
<p> <br />
{/exp:channel:entries}
Outputs the following when an invalid URL is accessed:
{redirect="404"
————
Test code 2 (no change other than spacing around the redirect tag):
{exp:channel:entries channel="news|about" limit="3" disable="categories|member_data|category_fields|pagination" require_entry="yes" status="open|featured"}
{if no_results}
{redirect="404"}
{/if}
<h4><a href="http://{comment_url_title_auto_path}">{title}</a> // {entry_date format="%F %d %Y"}</h4>
<p> <br />
{/exp:channel:entries}
Outputs the following when an invalid URL is accessed:
<div id="page_header">
<h2>Not Found</h2>
<p> </div>
(The contents of global_embeds/.page_header)
This is an ‘Agile Records’ demo site with an untouched 404 template and unmodified 404 settings. If I attempt to load the URL of a non-existant template group I see the perfectly formatted 404 template, so this seems to be related to the redirect tag.
Also, if I try to load http://ee2/index.php/news/comments/ then I see
{redirect="404"
inside the content_pri div.
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); } ```