Re: Re[3]: [SMARTY] dyamic include file variable
| From: | Monte Ohrt | Date: | Thu, 09 Jan 2003 19:38:01 +0000 |
| Subject: | Re: Re[3]: [SMARTY] dyamic include file variable | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7093@lists.php.net to get a copy of this message | ||
We do something kind of similar. Instead of rewrite rules, we have one
rule in apache, the errordoc handler:
ErrorDocument 404 /error_handler/index.php
Then it is up to PHP to deal with the situation. This program tries to
make sense of what was being fetched. For instance, if it is a valid
shortcut like /ART/abc123, it will redirect the browser to the proper
full URL /news/show_article.php?article_id=abc123
Last resort, it pulls up a web page with a custom 404 error message
(using Smarty to match the site style of course :-)
This way if we ever want to extend the functionality of error pages, we
can do that in PHP and not complicate httpd.conf or have to restart
apache.
Monte
On Thu, 2003-01-09 at 12:57, Bertrand DUNOGIER wrote:
> I'm gonna quickly describe a method i have used on 2 sites so far, and
> that seems to be good with Smarty.
>
--
Monte Ohrt <monte@ispi.net>