It's really a crazy story.
To summarize :
With Template JOURNAL 3:
Failed to load resource: net :: ERR_TOO_MANY_REDIRECTS fontawesome-webfont.woff2: 1
Failed to load resource: net :: ERR_TOO_MANY_REDIRECTS fontawesome-webfont.woff: 1
Failed to load resource: net :: ERR_TOO_MANY_REDIRECTS fontawesome-webfont.ttf: 1
Example of the offending url: /catalog/view/theme/journal3/icons/fonts/icomoon.woff?gzj9ot
With the native Template:
Failed to load resource: net :: ERR_TOO_MANY_REDIRECTS fontawesome-webfont.woff: 1
Failed to load resource: net :: ERR_TOO_MANY_REDIRECTS fontawesome-webfont.ttf: 1
Example of the offending url:
/catalog/view/javascript/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0
We only get these errors when we activate Litespeed cache on our server with Cpanel.
No errors to report when we deactivate Litespeed cache
Our .htaccess :
Code:
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
Header set X-Content-Type-Options nosniff
Header always set Strict-Transport-Security "max-age=31536000"
</IfModule>
Options +SymLinksIfOwnerMatch
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines:
# Order deny,allow
# Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# force https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP:X-Forwarded-SSL} =off
# force www
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s on(s)|offs()
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^robots.txt$ index.php?route=extension/feed/uksb_sitemaps/robots/ [L]
# RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/uksb_sitemaps&store=0/ [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://%{HTTP_HOST}? [R=301,L]
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
# Video
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"
# CSS, JavaScript
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
# Others
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
</IfModule>
### LITESPEED_CACHE_START - Do not remove this line
<IfModule LiteSpeed>
CacheLookup on
## Uncomment the following directives if you has a separate mobile view
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC] RewriteRule .* - [E=Cache-Control:vary=ismobile]
</IfModule>
### LITESPEED_CACHE_END
We tried by commenting on several rules in the htaccess, we also tried with Header set Access-Control-Allow-Origin, no better ...
We cannot understand why we have these TOO_MANY_REDIRECTS only on web fonts and that on the 2 templates. Does it come from htaccess? A problem on Opencart?
I hesitate between a rope or a revolver ... Thanks for your help. Ohhhh help