Rewrite/redirect issue

Sergey A. Osokin osa at freebsd.org.ru
Thu May 6 15:02:33 UTC 2021


Hi Eric,

hope you're doing well these days.

On Thu, May 06, 2021 at 02:01:40PM +0000, Eric Speake wrote:
> I am trying to redirect mydomain.com/summersummit to new.mydomain.com/events/employee-events/summersummit2021. Here is what I have in my config:
> 
>    location  /summersummit {
>    return 301 https://new.mydomain.com/events/employee-events/summersummit2021;
>    }

This one should work.

> I have also tried:
> rewrite ^/summersummit/(.*)$ https://new.dmp.com/events/employee-events/summersummit2021 permanent;
> But the redirect doesn't work. It still goes to mydonain.com/summersummit.

Could you explain a reason of this second one.

Thank you.

-- 
Sergey Osokin


More information about the nginx mailing list