Making a 301 php no follow redirect

1 replies
Hi there warriors I need some help to make a 301 php nofollow redirect.

This is what I have

This works
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.hotmail.com" );
?>

This doesn't
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.hotmail.com"rel="nofollow" );
?>

as it gives me this:

Parse error: syntax error, unexpected T_STRING in /public_html/michaelnguyen/test/index.php on line 3

Thank you for your reply
#301 #follow #making #php #redirect
  • Profile picture of the author mojojuju
    Originally Posted by michael_nguyen View Post

    Hi there warriors I need some help to make a 301 php nofollow redirect.

    This is what I have

    This works
    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.hotmail.com" );
    ?>

    This doesn't
    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.hotmail.com"rel="nofollow" );
    ?>

    as it gives me this:

    Parse error: syntax error, unexpected T_STRING in /public_html/michaelnguyen/test/index.php on line 3

    Thank you for your reply
    Get rid of the rel="nofollow". That has nothing to do with http headers as your script is producing. If you want to block robots, then use .htaccess or php or robots.txt to block the user agents that you don't want to follow.
    Signature

    :)

    {{ DiscussionBoard.errors[710217].message }}

Trending Topics