1

I have a hook menu

$items['mypage'] = array(
    'title' => t('My Page title'),
    'description' => '',
    'type' => MENU_CALLBACK,
    'page callback'=> 'my_home_page',
    'access arguments' => array('access content'),
);

Now when I access a page which is not existing like "mypage/blahblah" it will show my home page(ie http://www.mydomain.com/mypage/blahblah is rendering content of http://www.mydomain.com/mypage). Instead of this I need to show a 404 page.

Can anybody give comment on this ?

subi
  • 89
  • 7

1 Answers1

0

You can try to paste the following code in your page call back function "my_home_page"

if ('' != arg(1)){
    drupal_not_found();
}

Thanks Rahul

Rahul PK
  • 270
  • 5
  • 22