在做Affiliate项目时,最好不要让一般的人看懂那是affiliate link,所以我们需要创建一个网页重定向来掩饰这个链接。
——————————————————————————–
HTML语言
<html>
<head>
<meta http-equiv=”Refresh” content=0;url=”http://www.dingdelaotou.com”>
</head>
<body>
显示文字(可不要)
</body>
</html>
——————————————————————————–
ASP语言
<%Response.Redirect “http://www.dingdelaotou.com”%>
——————————————————————————–
ASP.NET语言
[code]<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.dingdelaotou.com");
}
</script>
--------------------------------------------------------------------------------
JS语言
<script language="javascript">
url = window.location.href;
url = url.replace("http://www.dingdelaotou.com","http://你的域名.com");//把网址代换
window.navigate(url);
</script>
--------------------------------------------------------------------------------
PHP语言
<?
Header( "Location: http://www.dingdelaotou.com" );
?>
地址转向:建立一个叫product.php的文件,内容如下:
<?php
header("Location:
http://affiliate.publisher.hop.clickbank.net");
exit;
?>
把它连接到product.php
{ 1 comment… read it below or add one }
php的301重定向代码
在 index.php 的最顶部加入以下几行:
< ?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.dingdelaotou.com/“?>);
exit();