Post by MichalVl » Tue Feb 19, 2019 5:34 pm

Hi,
I have an e-shop in Opencart 2.2.0.0. The data are uploaded on http://webian.akis.cz/kukin/brother.nah ... z/opencart. I also have a domain tiskarny.nahradko.cz. On our server (webian.akis.cz) I have the virtual host. So if someone writes http://tiskarny.nahradko.cz the data from webian are displayed. If I run my eshop from webian, everything is OK. But if I run e-shop from tiskarny.nahradko.cz, the font-awesome disappear. In console I get
http://webian.akis.cz/kukin/brother.nah ... f2?v=4.4.0. (Reason: missing header CORS 'Access-Control-Allow-Origin')
. So I edited .htacces in /opencart root and I added

Code: Select all

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>
at the end of this file. But it didn't help. So where do I make a mistake?

Newbie

Posts

Joined
Mon Feb 18, 2019 9:47 pm

Post by IP_CAM » Wed Feb 20, 2019 12:06 am

Code: Select all

<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Put that Code way up in the .htaccess file, before the:

Code: Select all

# SEO URL Settings
RewriteEngine On
Ernie

I am no longer active around here, to reach me, contact: jti@jacob.ch
My latest Freeware Opencart LIGHT Testsite, available on demand: http://www.ebikes.li/shop/
My 888 FREE OC Extension-Repositories - from OC v.1.5.x up,
on the largest OC Extension Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by MichalVl » Wed Feb 20, 2019 3:16 am

IP_CAM wrote:
Wed Feb 20, 2019 12:06 am

Code: Select all

<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
Put that Code way up in the .htaccess file, before the:

Code: Select all

# SEO URL Settings
RewriteEngine On
Ernie
Thank you for your answer, but it didn't help.

Newbie

Posts

Joined
Mon Feb 18, 2019 9:47 pm

Post by OSWorX » Wed Feb 20, 2019 3:52 am

Maybe read something like this:
https://stackoverflow.com/questions/106 ... oesnt-work

And a 'bit' more for the interested:
https://www.html5rocks.com/en/tutorials/cors/

Forum Rules [en]: viewtopic.php?f=176&t=200480
Forumregeln [de]: viewtopic.php?f=37&t=114208
Commercial Request: viewforum.php?f=88

Image Image Image


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MichalVl » Wed Feb 20, 2019 4:36 am

OSWorX wrote:
Wed Feb 20, 2019 3:52 am
Maybe read something like this:
https://stackoverflow.com/questions/106 ... oesnt-work

And a 'bit' more for the interested:
https://www.html5rocks.com/en/tutorials/cors/
Thank you, but still no change. :(

Newbie

Posts

Joined
Mon Feb 18, 2019 9:47 pm
Who is online

Users browsing this forum: No registered users and 4 guests