title: using wp_redirect to redirect wordpress pages
body: <p>Since I don't want to use another plugin to do simple redirect tasks, I decided to use the following code.</p>
  
  <blockquote>
    <p>wp_redirect( "<a href="http://www.example.com/contact-us" rel="noreferrer">http://www.example.com/contact-us</a>", 301 );</p>
  </blockquote>
  
  <p>so here is my question.</p>
  
  <p>Let's say I have a page called "<a href="https://www.example.com/contact-us-3/" rel="noreferrer">https://www.example.com/contact-us-3/</a>" that needs to redirect to "<a href="https://www.example.com/contact-us/" rel="noreferrer">https://www.example.com/contact-us/</a>".</p>
  
  <p>Or I should say I really want the redirect to happen regardless of http or https, www or non-www.
  I am want "/contact-us-3/" to redirect to "/contact-us/" page.</p>
  
  <p>Does that mean I have to put the following code inside the wordpress contents? Where do I exactly put the code? function.php in the child theme? I do I specify the page that needs to be redirected?  or I do have to create a page "/contact-us-3/" and put the code in the page?</p>
  
  <p>Also, do I have to put the fully qualified domain name url?</p>