.htaccess htaccess将www重定向到非www阻止bing bot

.htaccess htaccess将www重定向到非www阻止bing bot,.htaccess,.htaccess,此访问代码: 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] Rewrit

此访问代码:

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]
我已经有一个多月了,现在我看到它阻止了bingbot对我的站点进行爬行和索引(当我使用bingbot进行抓取时,它会显示意外错误)。当我删除前三行时

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.pl [NC]
RewriteRule ^(.*)$ https://example.pl/$1 [L,R=301]
它很好,但现在网站不会从www重定向到非www

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