Redirect not changing url in user browser

Comments

4 comments

  • Hiro

    Hi Fernando,

    If you are looking to keep the same host www.host1.com and URL in the browser, you can't use the 301/302 redirection because it triggers the client to send another HTTPS request. Instead, you could

    1) set the www.host2.com as origin and
    2) rewrite the URL from /fastly_test to /blog, so that the browser keeps the same URL but Fastly pulls the content from www.host2.com/blog.

    If you come across any issue, please feel free to send us a ticket with your service ID. Happy to help.

    Best,

    Hiro

    0
    Comment actions Permalink
  • Juan Berretta

    Hiro

    I know it's been a while but I was wondering how exactly you can do #2? I've tried doing "set req.url '/some/path'" but it ends up showing '/some/path' in the user browser... 

    Would really appreciate any help!

    0
    Comment actions Permalink
  • Test Test

    Hiro

    Would really appreciate if you could provide answer to the second point. How can set the origin ?

    Thanks!

    0
    Comment actions Permalink
  • Smitha (Fastly)

    Hello,

    We'd be happy to assist.  In order to address your specific use case, please send us a support ticket by emailing support@fastly.com.  Please include your service ID.

    0
    Comment actions Permalink

Please sign in to leave a comment.