【问题标题】:E107 redirect facebook scraping errorE107 重定向 facebook 抓取错误
【发布时间】:2012-05-25 12:21:23
【问题描述】:

这是我的 .htaccess 文件:

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} !^/?(usersettings\.php|page\.php|news\.php|signup\.php|admin/|plugins/forum/|plugins/.*/.*config\.php)
RewriteCond %{HTTP_REFERER} !^http://(.*\.)?lf1medsoc\.com [NC]
RewriteRule .* - [F,L]

# 2. Redirect all access to the following user agents and files
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4\.76\ \[ru\]\ \(X11;\ U;\ SunOS\ 5\.7\ sun4u\) [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5.0$ [OR]
RewriteCond %{HTTP_USER_AGENT} (Bot\ Search|kangen|CaSpEr|MaMa|crew|plaNETWORK|dex|perl\ post$) [NC,OR]
RewriteCond %{REQUEST_URI} (contact\.php|help_us\.php|forum_index\.php|crossdomain\.xml|\.htaccess)
RewriteRule .* http://%{REMOTE_ADDR}/ [R,L]

# 3. Deny access to requests with contact.php or help_us.php in the query
# string, UNLESS those are referred from our own site (e.g. search)
RewriteCond %{QUERY_STRING} (contact\.php|request\.php\help_us\.php|casper)
RewriteCond %{HTTP_REFERER} !^http://(.*\.)?lf1medsoc\.com [NC]
RewriteRule .* - [F,L]

# 4. Redirect empty user agent, UNLESS it's accessing the RSS feed
RewriteCond %{HTTP_USER_AGENT} ^$ 
RewriteCond %{REQUEST_URI} !^/?e107_plugins/rss_menu/rss.php
RewriteRule .* http://%{REMOTE_ADDR}/ [R,L]

# 5. Deny access to these files UNLESS referred from our site.
RewriteCond %{REQUEST_URI} ^/?(top|download|user|search|submitnews|fpw)\.php
RewriteCond %{HTTP_REFERER} !^http://(.*\.)?lf1medsoc\.com [NC]
RewriteRule .* - [F]

http://www.lf1medsoc.com/page.php?19 的 Facebook linter 结果(可公开访问,无需登录等):

(WHOLE result page)

抓取信息

响应代码:200 获取的网址:http://www.lf1medsoc.com/page.php?19 规范网址:http://www.lf1medsoc.com/ Final URL:http://www.lf1medsoc.com/page.php?2 必须修复的错误

循环重定向路径:检测到循环重定向路径(有关详细信息,请参阅“重定向路径”部分)。

重定向路径

原文:http://www.lf1medsoc.com/page.php?19 OG:网址:http://www.lf1medsoc.com/ 302:http://www.lf1medsoc.com/page.php?2 OG:网址:http://www.lf1medsoc.com/ 最终到达网址以粗体显示(这是 我们尝试从中提取元数据的 URL)。属于 循环重定向路径高亮显示。

我在 htaccess 中遗漏了什么吗? 有没有办法添加允许访问的 facebook 用户代理

注意:page.php?2 是主页(重定向自 lf1medsoc.com --> index.php --> page.php?2)

【问题讨论】:

    标签: facebook .htaccess redirect scraper


    【解决方案1】:

    http://www.lf1medsoc.com/page.php?2 上的 og:url 标签指向 http://www.lf1medsoc.com/

    改成http://www.lf1medsoc.com/page.php?2

    【讨论】:

    • 谢谢你!感谢上帝,htaccess 没有任何问题。
    猜你喜欢
    • 1970-01-01
    • 2012-01-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-29
    • 1970-01-01
    相关资源
    最近更新 更多