-
AuthorPosts
-
December 9, 2018 at 6:29 pm #1042782
Hi,
On my site, url is in the private part, the icons of the cart and Facebook are not displayed, instead of the icons, there is an empty rectangle. I’ve read the topics in the forum and documents and changed it to my htaccess-file, but it doesn’t solve my problem. I’ve deleted my cache about a hundred times with all the changes I’ve tried. Also disabled all the css minifying and that kind of stuf. As I read the error’s, there are two, they are about the blocked cors policy.
Hope you can help me sorting this out.
Regards,
ErwinDecember 9, 2018 at 10:46 pm #1042829Hey Erwin,
I see your issue CORS issue, as you wrote about, you also had a couple of 503 errors for jQuery & css on first load, but a second load didn’t show the 503 errors.
It seems that the easiest solution would be to have these assets served from the sub-domain directly, like everything else, rather than calling a different sub-domain, but I’m not sure how you have your site set up.
I see that the other sub-domain is redirected to the url you posted, was that a testing site?
Perhaps searching your database for the sub-domain “technologie” and replacing with the sub-domain “denp” would correct this error, but I will know more when you explain the relationship of the two.Best regards,
MikeDecember 9, 2018 at 11:01 pm #1042832Hello Mike,
Thank you for looking into it.
The domain it self is from the school where I teach. The first subdomain was technologie.het… that was for a course. After a few years the title of the course has been changed to denp, it’s an abbreviation. So I’ve kept the existing subdomain and set up some forwards to achieve the right url in the adressfield and the site is reachable by the new subdomain.
The wordpress-installation is in the first subdomain, technologie.het…Hope I made it clear to you so that you can give me an even better advice!
Regards,
Erwin
December 9, 2018 at 11:27 pm #1042835Hi,
Thank you, so I understand that the install and all resources are in the same directory, and you are redirecting to a new url, and you tried adding some code to your .htaccess, such as this:Header Set Access-Control-Allow-Origin "*"
did you try adding this to the .htaccess in both sub-domain directories?
How to enable Cross-Site XMLHttpRequests (Cors) using .htaccess
Best regards,
MikeDecember 10, 2018 at 12:02 am #1042844Hi,
denp.het… doesn’t have hosting, it’s just a url. Sot here isn’t an access for it. I’d already added that code to the htaccess in technologie.het…
Regards,
Erwin
December 11, 2018 at 10:03 am #1043663Hi,
Any other suggestions? Tried to add the code from the url to my htaccess, but that didn’t help either. I got a 503 instead…
Regards,
ErwinDecember 12, 2018 at 7:19 am #1044151Hi,
Please try this in your .htaccess:<IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule>
or you can send the header from a PHP script in your header at the top before any output within the php tags:
header("Access-Control-Allow-Origin: *");
or this outside of the php tags after the “head” tag:
<?php header("Access-Control-Allow-Headers: Authorization, Content-Type"); header("Access-Control-Allow-Origin: *"); ?>
Perhaps your server is not using Apache, here is a list of servers with their commands
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.