htaccess重定向www到非www阻止bing机器人

时间:2017-01-02 15:27:10

标签: .htaccess

这个htaccess代码:

DECLARE
    CURSOR sourceCursor IS SELECT a, b, c, c as d FROM sourceTab;

    TYPE        tSourceTabType IS TABLE OF sourceCursor%ROWTYPE;   
    vSourceTab  tSourceTabType;

    vLimit      number := 10;   /* here you decide how many rows you insert in one shot */
BEGIN   
    OPEN sourceCursor;
    LOOP
        FETCH sourceCursor 
            BULK COLLECT INTO vSourceTab LIMIT vLimit;
        forall i in vSourceTab.first .. vSourceTab.last
            insert into targetTab values vSourceTab(i);
        commit;
        EXIT WHEN vSourceTab.COUNT < vLimit;

   END LOOP;

   CLOSE sourceCursor;
END;

我已经有一个多月的时间了,现在我发现它阻止了bing机器人抓取并索引我的网站(当我用bingbot取得它意外的错误时)。当我删除前三行

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.pl [NC]
RewriteRule ^(.*)$ https://example.pl/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^inc/.*$ index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !-l
RewriteCond %{REQUEST_FILENAME} !\.(ico|css|png|jpg|gif|js)$ [NC]
RewriteRule ^(.*)$ index.php [QSA,L]

它很好,但现在网站不会从www重定向到非www

第一次重写是从www到非www,第二次是从http://到https://,其余的代码是我的php脚本seo urls。

0 个答案:

没有答案