Welcome! Log In Create A New Profile

Advanced

Re: How to get nginx to redirect to another path only if the root path is requested?

Francis Daly
January 27, 2018 08:28AM
On Fri, Jan 26, 2018 at 02:24:16PM -0500, leeand00 wrote:

Hi there,

> How to get nginx to redirect to another path only if the root path is
> requested?

I don't understand the rest of your mail; perhaps if you could show one
request that you make and the response that you get, and how it is not
the same as the response that you want, that would be clearer.

But this first question, I do understand.

location = / { return 301 /rootWiki/; }

should do what you want.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to get nginx to redirect to another path only if the root path is requested?

leeand00 January 26, 2018 02:24PM

Re: How to get nginx to redirect to another path only if the root path is requested?

Francis Daly January 27, 2018 08:28AM

Re: How to get nginx to redirect to another path only if the root path is requested?

leeand00 January 27, 2018 09:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 237
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready