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
Description

Is it possible to create a redirect with a X-Robots Tag: Nofollow?

Thanks!

Florian

#1

Dave Reid - November 4, 2009 - 00:19
Status:active» fixed

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:

<?php
function mymodule_path_redirect($redirect) {
 
drupal_set_header('X-Robots-Tag: Nofollow');
}
?>

I'm not sure on the name of the hook yet however.

#2

wflorian - November 4, 2009 - 10:29

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

System Message - November 18, 2009 - 10:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.