Maxim Dounin
March 03, 2014 11:48AM
Hello!

On Mon, Mar 03, 2014 at 10:43:01AM -0500, zuckbin wrote:

> hi,
>
> i want to do a 301 redirect on all my alias domain for a domain
>
> but i stuck in an infinite loop!
>
> server{
> listen 80;
> server_name www.aaa.com www.aa.com ...
> return 301 http://www.bbb.com$request_uri;
>
> }
>
> server{
> listen 80;
> server_name www.bbb.com
> ...
> ....
>
> }
>
> how to solve this ?

The configuration above should not result in an infinite loop.
Things to check in no particular order:

- Make sure configuration you are working with is actually one
loaded by nginx. That is, make sure you've done a configuration
reload and it was successfull.

- Make sure you aren't testing your browser's cache instead of
current configuration. That is, make sure to clear cache before
each test. Or, better yet, use telnet or curl for tests.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirect 301 alias domain

zuckbin March 03, 2014 10:43AM

Re: redirect 301 alias domain

Francis Daly March 03, 2014 11:38AM

Re: redirect 301 alias domain

Maxim Dounin March 03, 2014 11:48AM

Re: redirect 301 alias domain

zuckbin March 04, 2014 06:10AM

Re: redirect 301 alias domain

Francis Daly March 04, 2014 07:16AM

Re: redirect 301 alias domain

zuckbin March 04, 2014 08:27AM

Re: redirect 301 alias domain

zuckbin March 04, 2014 08:30AM

Re: redirect 301 alias domain

Francis Daly March 04, 2014 02:50PM

Re: redirect 301 alias domain

zuckbin March 05, 2014 03:18AM

Re: redirect 301 alias domain

Francis Daly March 05, 2014 08:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
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