0

在测试 linting Ajax URL 时,我注意到一个奇怪的行为。可以在http://jankrems.de/hashbang/#!/foo.php找到一个简单的技术测试

我尝试对 Twitter hashbang-Urls 进行 linting,它们得到了正确处理。我使用的代码非常简单。在 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