> 
> Is there a smart generic way to return 404:s for articles or
> topics that dont exist? Ie, when a active page is loaded and the 
> arguments (argv/c) dont "exist" in the selected article tree, what
> is the smartest way to inform the user that his url is bogus. 


Url  - www.site.com/news/latest/123/article.html

Page "news" set to active.

"/latest/123/article.html" is argv[$i] array

and code:

<? 

$article = mgd_get_article($argv[1]);

// argv[1] is id in this case '123'

// chceck if we may display it out
// if exists and if article is in "that good one" topic

if  ($article && $article->topic != $correct_topic) {

// whatever here , header for 404 or make own 404 page

} else {

// do anything You want with article

} ?>
> 

> As I understand it, normally active pages with a nonsence-uri just 
> loads the default page without redirection. But I note that on
> some sites, midgard-project.org/news for example, the uri appears 
> to be redirected to the default news page.  

It depends how is that page coded and what $argv You need to your page.
As above if you request www.site.com/news/hack_my_site . midgard 
will send news default page to browser as 'hack_my_site' is argv which is not 
defined anywhere.

Piotras

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to