사용자 에이전트를 기반으로 사용자를 리디렉션해야합니다.사용자 에이전트를 기반으로 리디렉션 요청
현재 내 wordpress 사이트는 ajax 기반 테마를 사용하고 있습니다. 따라서 URL 형식은
http://www.example.com/#!/my_first_post/
입니다. 현재 사용중인 htaccess 코드는 다음과 같습니다.
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로 작업을 수행해야합니다
# 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
이것은 내가하고 도움이 필요한 것입니다. 도와주세요.
RewriteCond %{HTTP_USER_AGENT} facebookexternalhit/1\.1 [NC]
을하지만 당신을 도울 않을거야 :
해시 뱅크 ... Yuck ... http://www.webmonkey.com/2011/02/gawker-learns-the-hard-way-why-hash-bang-urls-are-evil/ –