note 113606 added to function.header

From: Date: Mon, 04 Nov 2013 10:24:39 +0000
Subject: note 113606 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-197431@lists.php.net to get a copy of this message
For Joomla! users. Internet advice for creating your own 404 page often suggests you add the following line to your error handler to redirect to a custom page: <?php header ('Location: /index.php?option=com_content&view=article&id=123') ; ?> (where id=123 identifies the menu item for the custom page). This works but doesn't create a nice URL and also exposes the Joomla! nature of the site through use of index.php with the GET parameters. If you have search engine friendly URLs turned on, you can use a much nicer URL in the header: <?php header ('Location: http://mysite.com/page-not-found') ; ?> (where page-not-found is the menu alias for the page you want to display). ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/113606 Del: integrated -- https://master.php.net/note/delete/113606/integrated Del: useless -- https://master.php.net/note/delete/113606/useless Del: bad code -- https://master.php.net/note/delete/113606/bad+code Del: spam -- https://master.php.net/note/delete/113606/spam Del: non-english -- https://master.php.net/note/delete/113606/non-english Del: in docs -- https://master.php.net/note/delete/113606/in+docs Del: other reasons-- https://master.php.net/note/delete/113606 Reject -- https://master.php.net/note/reject/113606 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197431) next »