如何减少重定向的数量?

时间:2019-06-22 12:03:24

标签: apache .htaccess

我希望减少站点URL上的301重定向。 您可以在此处查看重定向链:https://i.ibb.co/cNVhsLF/redirects.jpg

我能做些什么来减少重定向的数量? 预先感谢。

RewriteCond %{HTTPS}        =off   [OR]
RewriteCond %{HTTP_HOST}    !^example\.com$
RewriteRule ^(.*)$          "https://example.com/$1" [R=301,L]
RewriteRule ^blog/(.+)/?$ /$1 [L,R=301]
RewriteRule ^category/(.+)$ https://example.com/$1 [R=301,L]

0 个答案:

没有答案
相关问题