Can you use the Rules engine to set up 301 directs?

massad 65 Reputation points
2023-10-16T03:09:10.4366667+00:00

Trying to figure out the best way to set up 301 redirects.

I see on the CDN there is a rules engine with 301 redirect options. However, I tried a few settings that I though made sense and the redirects aren't working.

Can you show me an example of how to set up a 301 redirect using the Rules? I'm trying to 301 redirect /en/home/ to /en/

Site is clearblueionizer.com

Thanks!

Azure Content Delivery Network
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,269 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 19,631 Reputation points Microsoft Employee
    2023-10-16T11:59:44.26+00:00

    @massad Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on your earlier Posted questions here in this forum, I am assuming that you are still working with Wordpress on App Service and trying to configure some redirect rule in the CDN profile that got created while deploying this Word press image.

    To test/reproduce this behavior, I have created two sample pages /testing-page-to-check-user-issue another page /child-item/ and added /testing-page-to-check-user-issue as parent.

    When I make a request to path

    https://<cdnName>-endpoint.azureedge.net/testing-page-to-check-user-issue/child-item/ the request should be re-directed to https://<cdnName>-endpoint.azureedge.net/testing-page-to-check-user-issue/

    To achieve this, I have created the below rule in rule engine as shown below.

    User's image

    Here are the values passed to RequestURL and Path parameters.

    RequestURL: testing-page-to-check-user-issue/child-item
    Path: /testing-page-to-check-user-issue/
    HostName: https://<CDNName>-endpoint.azureedge.net
    

    I have tested this it is working fine and I would request you to validate from your end.

    Feel free to reach back to me if you have any further questions on this.