【发布时间】:2015-03-02 14:40:56
【问题描述】:
我在 php 中制作了小脚本,它的作用是获取 url 并将其重定向到另一个网站,仅更改域名,其余 url 保持不变 这是我的代码
.htacess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*)$ /index.php?path=$1 [NC,L,QSA]
index.php
<?php
$url = 'http://justfun4funny.com/';
if (isset($_REQUEST['path']))
{
$url.=$_REQUEST['path'];
}
//var_dump($url);
header( "refresh:0;url=$url" ); ?>
<html>
Please wait while article is being loaded
<h1 style="color:blue;font-size:30"><a rel="canonical" href="<?php echo $url ?>">Click Here to Continue</a></h1>
<div style='display:none'>
<iframe src="<?php echo $url?>"></iframe>
</div>
</html>
我面临的问题是当我将此网址粘贴到我的 Facebook 状态时
http://viralresort.com/2801
它读取网站的所有数据,包括图片。
http://viralresort.com/2660
但上面的 url 无法被 facebook 识别它显示空白数据
【问题讨论】: