0
我需要根据Useragent重定向用户。基于用户代理的重定向请求
目前我的WordPress的网站使用基于Ajax的主题。所以url格式是
http://www.example.com/#!/my_first_post/
我目前的htaccess代码如下。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
这就是我需要帮助的事情:
if (user agent == "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"){
redirect the url without hashes
ex:http://www.example.com/my_first_post/
}
我需要做到这一点使用htaccess的。请帮帮我。
Hashbangs ... Yuck ... http://www.webmonkey.com/2011/02/gawker-learns-the-hard-way-why-hash-bang-urls-are-evil/ – 2013-05-03 10:00:57