Answer the question
In order to leave comments, you need to log in
Image problem, how to solve?
I have two subdomains, (different folders on the VPS) 1 of them is the client part, the other is the server part, and here are the problems with it. There are images on it, but when I try to get a picture through the href of img, I get an error in the console 403. I suspect that the problem is in .htaccess
Here is the file itself:
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(google.com|staging.google.com|development.google.com|case.cgs-game.ru|localhost:8080)$" AccessControlAllowOrigin=$0
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header add Access-Control-Allow-Credentials "true"
</IfModule>
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?case.cgs-game.ru.*$ [NC]
RewriteRule \.(jpe?g|bmp|gif|png|css|zip|pdf|txt|doc)$ - [NC,F,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question