Reply to comment

As we all know drupal has a default front page which shows a view of teaser nodes promoted to front.
Most sites will replace this page with something else.
But we might forget that we can still go to this page. You might want to remove it.
A simple trick to do this is to make it go to the page not found.
How: drupal has the custom_url_rewrite_inbound function we can use. You should put it in the settings file. Since it is called before drupal loads anything this would be a very good time to change the incomming url and make it go to a page not found.

<?php
//put this in settings.php
function custom_url_rewrite_inbound(&$result$path$path_language) {
  if (
$path == 'node') {
    
//this will cause a page not found
    
$result ''
  }
}
?>

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><img><p><b><i><table><th><tr><td><blockquote><br /><img /><tbody><span><strike>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <codes>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.