0

Ajax URL の linting をテストしているときに、奇妙な動作に気付きました。簡単な技術テストはhttp://jankrems.de/hashbang/#!/foo.phpにあります。

Twitter の hashbang-Url をリントしてみましたが、正しく処理されました。私が使用したコードはかなり簡単です。index.phpには転送があります...

<?php
if(isset($_GET['_escaped_fragment_'])) {
    Header( "HTTP/1.1 301 Moved Permanently" );
    header('Location: /hashbang'.$_GET['_escaped_fragment_']);
    die();
}
?>

そして foo.php で Open Graph タグを出力するだけです...

 <!DOCTYPE HTML>
 <html prefix="og: http://ogp.me/ns#">
 <head>
    <meta property="og:title" content="Foo" />
    <meta property="og:url" content="http://jankrems.de/hashbang/foo.php" />
    <meta property="og:description" content="The foo to go to" />
    <meta property="og:image" content="http://tailsmagazines.files.wordpress.com/2009/04/kitten.jpg" />
 </head>
 </html>

多分私は盲目で、明らかな何かを見逃しています。

4

0 に答える 0