• Resolved marioteixeira

    (@marioteixeira)


    Hi,

    I’m using W3 Total Cache plugin to connect my website to a Microsoft’s CDN on Azure. I was able to made that configuation and everything goes well, however, I’m facing a problem and I need your help to solve it.

    If I access the site through the CDN’s url, the site rendering goes well. However, when Istart navigating on the site, the url automatically changes to the origin’s url. It shouldn’t stay allways the same (cdn’s url) instead of redirecting/rewriting to origin’s url? The plugin is doing a rewrite or a redirect?

    Best,
    Mário Teixeira

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @marioteixeira

    I am sorry about the issue you are experiencing and I am happy to help!
    Can you please share the steps to reproduce this?
    Which CDN type have you selected from the dropdown?
    Can you please also share the website URL?
    WIth the W3TC CDN option, you can integrate the CDN with the W3TC. Depending on a CDN provider, the CDN Url is automatically added, so the W3TC rewrites the URL for static files to point to the CDN URL
    Thanks!

    Thread Starter marioteixeira

    (@marioteixeira)

    Hello @vmarko,

    Thanks for your quickly reply.

    I choose the CDN Type “Generic Mirror”, I’m using the Azure Microsoft CDN.

    The website URL is: https://popcasts-teste.azurewebsites.net and the CDN URL is: https://popcasts-teste.azureedge.net

    In the Microsoft’s CDN configuration I’ve set the origin as the website’s url.

    Basically the steps where:
    1. Access Plugin’s General Settings (page=w3tc_general)
    2. Go to CDN
    3. Choose “Enable” CDN
    4. Choose “CDN Type” (Generic Mirror like I’ve said)
    5. Access CDN’s page (page=w3tc_cdn)
    6. Set the CDN’s URL (popcasts-teste.azureedge.net)

    Best,
    Mário Teixeira

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @marioteixeira

    Thank you for the information.
    I see where the confusion is. The URL you are mentioning https://popcasts-teste.azureedge.net is your website CDN URL which is used to rewrite the static elements like, JS, CSS, and images.
    So the CDN works as expected. Your website URL is https://popcasts-teste.azurewebsites.net/ and if you inspect the source, you can see that the files are being served from the CDN:
    https://popcasts-teste.azureedge.net/wp-includes/js/wp-embed.min.js?ver=5.8
    So this is not a redirect of your domain, this is how the CDN works.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect to CDN’s URL’ is closed to new replies.