title: Redirect using WAF vs CDN
body: <p>Our application has 2 domains. 
  <a href="http://www.example.org" rel="nofollow noreferrer">http://www.example.org</a>
  and
  <a href="https://secure.example.org" rel="nofollow noreferrer">https://secure.example.org</a></p>
  
  <p>We are planning to decommission <a href="https://secure.example.org" rel="nofollow noreferrer">https://secure.example.org</a> and have just 1 secure domain name:<a href="https://www.example.org" rel="nofollow noreferrer">https://www.example.org</a> </p>
  
  <p>But we want to make sure any old URL still works and gets redirect to the new URL. 
  <a href="http://www.example.org/my-url" rel="nofollow noreferrer">http://www.example.org/my-url</a> should redirect you to <a href="https://www.example.org/my-url" rel="nofollow noreferrer">https://www.example.org/my-url</a>
  <a href="https://secure.example.org/my-url" rel="nofollow noreferrer">https://secure.example.org/my-url</a> should redirect you to <a href="https://www.example.org/my-url" rel="nofollow noreferrer">https://www.example.org/my-url</a>.</p>
  
  <p>The question is - should the redirect be done at the CDN or WAF. We could also do it at the apache webserver, but would like to avoid hops. What is the best approach with their pros and cons. </p>
  
  <p>AWS CloudFront does not support redirects, but it can achieved with using lambda or by using S3. But is there any concern if we use WAF for redirects. </p>