PDA

View Full Version : Simple redirect script



ozgression
11-27-2005, 05:01 PM
Hi, I am looking for a very simple script I can use to stop search engines following affiliate links on my site.

I want something that goes like: www.mysite.com/link/to.php?=http://www.affiliate.com

And, I will block the /link/ folder in my robots.txt.

How would this be done?

eMEraLdwPn
11-27-2005, 05:19 PM
User-agent: *
Disallow: /link

i think that should work

ozgression
11-27-2005, 05:33 PM
I know how to do that. I am looking for a simple redirect script.

<edit>This is probably in the wrong forum</edit>

Chris
11-27-2005, 05:50 PM
<?

header("Location: $id");

?>

If you put id=url in your query string.

Also, just try rel=nofollow.

ozgression
11-27-2005, 05:56 PM
Works a treat. Thanks Chris.

freekrai
11-28-2005, 07:46 AM
You could also just put a rel="nofollow" tag in your link to the affiliate.

<a href="myaffiliatelink" rel="nofollow">some text</a>

Search Engines / spiders see that tag and ignore that link.