Hi there. Have you noticed, that a lot of websites running on OpenCart don't load font awesome icons if you type an url address with www. If you omit www in the address, then it's ok. It happens with a lot of websites. What could cause that and how to avoid this?
For example:
http://www.demo.towerthemes.com/tt_autima/ (no icons on Windows)
http://demo.towerthemes.com/tt_autima/ (icons are ok here)
use .htaccess and force non www.
Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here
And this one will make it work, regardless of using www or not:
I use it, to have my Style + JS Links made cookiefree
in the header.tpl (or header.twig) Files.
Ernie
Code: Select all
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
in the header.tpl (or header.twig) Files.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
I confirm that the solution did its jobIP_CAM wrote: ↑Fri Feb 01, 2019 7:11 amCode: Select all
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
Good for you !
By the way, I found a nice Assortment of most important OC .htaccess 'Routines'
on Github, and placed the Forklink on my Github Main Page, named: htaccess-rules
it might be of help for those, looking for Code, including an explanation on what it does. :-)
But don't just add them 'all together' onto an .htaccess File, or your Shopsite will go mad !
https://github.com/IP-CAM
Good Luck!
Ernie
By the way, I found a nice Assortment of most important OC .htaccess 'Routines'
on Github, and placed the Forklink on my Github Main Page, named: htaccess-rules
it might be of help for those, looking for Code, including an explanation on what it does. :-)
But don't just add them 'all together' onto an .htaccess File, or your Shopsite will go mad !
https://github.com/IP-CAM
Good Luck!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 288 guests