Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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,
    Erwin

    #1042829

    Hey 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,
    Mike

    #1042832

    Hello 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

    #1042835

    Hi,
    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,
    Mike

    #1042844

    Hi,

    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

    #1043663

    Hi,

    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,
    Erwin

    #1044151

    Hi,
    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.