On Thu, Nov 10, 2022 at 01:07:23PM -0500, blason wrote:

Hi there,

> I have a website http://web1.example.local/web1
> Instead I need a rewrite so that if user enters http://web1.example.local it
> will be diverted to http://web1.example.local/web1

If you want it to happen, without needing it to be a rewrite, you can
do a redirect with

        location = / { return 301 /web1; }

(although I suspect that you will want a trailing slash there,
"/web1/;". And variants with a different http response code can be
used. And you can use the full "http://web1.example.local/web1/"; if
you prefer.)

Cheers,

        f
-- 
Francis Daly        fran...@daoine.org
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org

Reply via email to