|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
asmar Smarty n00b
Joined: 26 Oct 2008 Posts: 4
|
Posted: Wed Feb 08, 2017 9:06 pm Post subject: http_response_code(404); |
|
|
Hi all,
I've got among others the following code:
Code: |
{if $paginate.total eq '0'}
<meta http-equiv="refresh" content="0;url={$smarty.const.WEBSITE_ROOT}/404.html">
{/if}
|
What I want is to replace the redirect with a plain 404 using the http_response_code(404);. Any idea how I can add the:
http_response_code(404);
and replace the whole line with the meta?
If I just added even in php tags or not it just displays the text browser and doing nothing. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Thu Feb 09, 2017 8:05 am Post subject: |
|
|
You can't send headers once body is sent. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|