我想重定向出站附属链接,在这个网站上没有 PHP 或 htaccess 选项。
到目前为止,我一直使用
<?php
header( 'Location:' ) ;
?>
但就像我说的那样,这不再是一个选项,因为该站点不再支持 php 或 .htaccess。
是否有替代解决方案,使用 HTML ?
之前使用此代码</head>
<meta http-equiv="refresh" content="0; url=http://youraffiliatelink.com/" />
在页面标题中使用此 hrml 代码:
<meta http-equiv="refresh" content="0; url=http://example.com/" />
或像这样使用 JavaScript:
<script type="text/javascript">
window.location.href = "http://example.com"
</script>