Hi martychc23,
My site running with CloudFlare and set minify css/js enabled but not successful to reproduce it on GT Metrix. Could you provide Report number and site link to us for check?
P.S. you can get report number from LSCache -> report.
Best,
Eric
Thread Starter
Anonymous User 14978628
(@anonymized-14978628)
Hi Eric,
My report number is: CEDRYSJP
Here is the issue i’m seeing on GTMetrix: https://gtmetrix.com/reports/www.celebrityhealthcritic.com/r5KkinFT
Look at the redirects section on pagespeed and yslow tabs in GTMetrix.
Thanks
Hi martychc23,
I just checked your site, there is no
https://www.celebrityhealthcritic.com/min/018d7.js
https://www.celebrityhealthcritic.com/min/018d7.js/
and other “Remove the following redirect chain” thing in your site by browser dev tool.
1. Please try purge all and purge from CDN, see if it works to you.
2. Stop CDN and try GTMetrix again, find which part is the issue come from.
Best,
Eric
-
This reply was modified 8 years, 6 months ago by
Cold Egg.
Thread Starter
Anonymous User 14978628
(@anonymized-14978628)
Hi, I’ve gone back to using CDN enabler and Autoptimize so these errors don’t appear anymore.
Hi @martychc23,
In your .htaccess, you have the following 301 redirection which caused the GTMetrix warning
# Trailing slash
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://www.celebrityhealthcritic.com/$1/ [L,R=301]
Our JS optimization doesn’t generate real files to get more efficient. The above rules redirected it.
You may need to remove that line to get GTMetrix giving a higher score.
Thanks
Hai
Thread Starter
Anonymous User 14978628
(@anonymized-14978628)
Ah, ok then. That htaccess code is meant to ensure there is a trailing slash at the end of urls to avoid duplicate content issues.
So if i removed this code would i not then have duplicate content issues for urls with and without trailing slash?
If you would like to keep it, that’s fine, just need to add one more RewriteCond to exclude ‘/min/’ path before RewriteRule.
Thread Starter
Anonymous User 14978628
(@anonymized-14978628)
Could you please provide the line i would need to include in my htaccess for this exclusion?
try changing
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ https://www.celebrityhealthcritic.com/$1/ [L,R=301]
to
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/min/.*
RewriteRule ^(.*)$ https://www.celebrityhealthcritic.com/$1/ [L,R=301]