0

我想重定向出站附属链接,在这个网站上没有 PHP 或 htaccess 选项。

到目前为止,我一直使用

<?php
header( 'Location:' ) ;
?>

但就像我说的那样,这不再是一个选项,因为该站点不再支持 php 或 .htaccess。

是否有替代解决方案,使用 HTML ?

4

2 回答 2

1

之前使用此代码</head>

<meta http-equiv="refresh" content="0; url=http://youraffiliatelink.com/" />
于 2014-08-01T17:42:38.917 回答
0

在页面标题中使用此 hrml 代码:

<meta http-equiv="refresh" content="0; url=http://example.com/" />

或像这样使用 JavaScript:

    <script type="text/javascript">
        window.location.href = "http://example.com"
    </script>
于 2014-03-22T05:25:40.040 回答