Create a redirect with nofollow?
wflorian - November 1, 2009 - 20:46
| Project: | Path redirect |
| Version: | 6.x-1.0-beta4 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Is it possible to create a redirect with a X-Robots Tag: Nofollow?
Thanks!
Florian

#1
Not currently. Since most times redirects are kept in-site, I don't think it would be good to add this to the module. Although I am probably going to be adding a hook_path_redirect() that gets invoked before a redirection happens, so you could add a small custom module to run:
<?phpfunction mymodule_path_redirect($redirect) {
drupal_set_header('X-Robots-Tag: Nofollow');
}
?>
I'm not sure on the name of the hook yet however.
#2
I am with you - I don't think a "Nofollow" option is necessary for all redirects, but for some redirect an available option to say that this redirect should be nofollow would certainly be helpful for a lot of users I think.
Thanks for the code, but unfortunatly I am a PHP newbie... where should I add the code?
Thanks a lot!
Florian
#3
Automatically closed -- issue fixed for 2 weeks with no activity.