我正在尝试提高网站的页面速度,在进行一些挖掘时,我发现正在进行很多重定向,我确实解决了很少但仍然有些重定向,但找不到解决方法。
网站正在Cloudways服务器上运行,我尝试在htaccess中重写规则,但仍然显示很少的错误。
#Expires headers configuration added by BREEZE WP CACHE plugin
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A2592000
ExpiresByType application/javascript "access plus 7 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType text/css "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/ico "access plus 7 days"
ExpiresByType image/x-icon "access plus 7 days"
ExpiresByType image/svg+xml "access plus 7 days"
ExpiresByType image/bmp "access plus 7 days"
</IfModule>
#End of expires headers configuration
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.2.3]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# 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
我正在尝试实现从http://www.example.com到https://example.com的单重定向,但是在此阶段,它看起来像这样:-
在网站上测试 https://varvy.com/tools/redirects/
请帮我解决这个问题,另外有4个类似错误的网站,它们正在影响整个网站的速度。