/title/something should redirect to /node/1234 instead of displaying the node by itself
inducer@news.ti... - January 5, 2005 - 12:39
| Project: | Title |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Since users tend to link to what's in their URL bar, it would be desirable if the permanent (/node/something) URL was in the URL bar even if they arrived via a /title/something link. The attached patch fixes this.
This also fixes this bug.
| Attachment | Size |
|---|---|
| title-2005-01-05-redirect-v01.patch | 576 bytes |

#1
I have been using drupal_goto() instead of head() (in drupal 4.6.3) as it recomends in drupaldocs.org:
The code will be as follows (starting in line 45):
<?phpelse if (db_num_rows($result) == 1) {
$node = db_fetch_object($result);
//$node = node_load(array('nid' => $node->nid));
//print theme('page', node_show($node, NULL), $node->title);
drupal_goto("node/".$node->nid); //better take you to the page instead of loading the page ;-)
}
?>
#2
Oh =) It does work now.. Strange, last I tried it didn't... Thanks for the patches
#3
ugh sorry, my last comment was meant for this thread: http://drupal.org/node/31069
#4
why not changing this back to code need review?