Welcome! Log In Create A New Profile

Advanced

Re: Subdirectory still redirecting to www. despite rule

September 19, 2012 03:22AM
On Wednesday 19 September 2012 04:25:53 Ian M. Evans wrote:
[...]
> location ^~ /blogs {
> try_files $uri /blogs/index.php?q=$uri;
> location ~ \.php$ {
> fastcgi_pass 127.0.0.1:10004;
> }
> }
> if ($uri ~ (/blogs/[^/]*)) {
> set $blogname $1;
> }

location /blogs {

...

location ~ ^/blogs/([^/]+) {
...
}
}

But your example config is completely broken. Probably you do not understand how
"location" works. If so, you should read these articles:

http://nginx.org/en/docs/http/request_processing.html
http://nginx.org/r/location


> location ^~ /blogs/$blogname {

Variables are not allowed here.

wbr, Valentin V. Bartenev

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

Subdirectory still redirecting to www. despite rule

Ian M. Evans September 18, 2012 08:28PM

Re: Subdirectory still redirecting to www. despite rule

Ensiferous September 18, 2012 08:36PM

Re: Subdirectory still redirecting to www. despite rule

Ian M. Evans September 18, 2012 09:06PM

Re: Subdirectory still redirecting to www. despite rule

VBart September 19, 2012 03:22AM

Re: Subdirectory still redirecting to www. despite rule

Ian Evans September 19, 2012 04:02AM

Re: Subdirectory still redirecting to www. despite rule

António P. P. Almeida September 19, 2012 05:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready