Maxim Dounin
January 04, 2019 12:40AM
Hello!

On Thu, Jan 03, 2019 at 08:46:30AM -0800, Mark Sellers wrote:

> I am building a simple module that does a uri rewrite (not using
> the rewrite module). The module directive is fastimg_rewrite
> with no parameters.
>
> I build the code, including the module.
>
> When attempt to access any url, I get an error in the log:
>
> *1 rewrite or internal redirection cycle while internally
> redirecting to "/images/bar/index.html”
>
> Funny thing is, I have not added the directive to my config file
> yet!
>
> Q1: Directive not in config - why is my module executing?

It is the module which decides what to do, and whether to do
anything without any directives in the configuration, or not.
That is, check your code.

> Q2: What does this error message indicate? I do want to redirect to “/images/bar/index.html”!!

The message indicates that there were too many redirects, and
nginx decided to stop it. Most likely, your code redirects all
requests, including already redirected ones, and this is what
causes the problem.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Module executed w/o directive in config

Mark Sellers 372 January 03, 2019 11:48AM

Re: Module executed w/o directive in config

Maxim Dounin 142 January 04, 2019 12:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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