Welcome! Log In Create A New Profile

Advanced

RE: rewrite don't work in a multilanguage MVC site

Fernando García Torres
October 25, 2011 03:02PM
> Date: Tue, 25 Oct 2011 19:33:15 +0100
> From: appa@perusio.net
> To: nginx@nginx.org
> Subject: Re: rewrite don't work in a multilanguage MVC site
>
> On 25 Out 2011 19h17 WEST, olfativo@hotmail.com wrote:
>
> >
> > Tried, and same results, redirect OK but 404 response.
> > Thanks!!
>
> Show your complete config.
>
> --- appa
>

Here we go. Those includes are the standard locations por PHP-FPM and static content:
map $http_accept_language $is_english { default 0; ~^en 1;}
map $http_accept_language $is_spanish { default 0; ~^es 1;}
server { listen 80; server_name localhost; root blah/blah;
location / { auth_basic "Restricted"; auth_basic_user_file htpasswd; index index.php index.html;
expires 30d;
if ($is_english) { return 301 /en; }
if ($is_spanish) { return 301 /es; }
location /es {}
location /en {}
try_files $uri $uri/ /index.php?ctr=$uri; }
include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf;}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite don't work in a multilanguage MVC site

Fernando García Torres October 25, 2011 12:58PM

Re: rewrite don't work in a multilanguage MVC site

António P. P. Almeida October 25, 2011 01:16PM

RE: rewrite don't work in a multilanguage MVC site

Fernando García Torres October 25, 2011 02:18PM

Re: rewrite don't work in a multilanguage MVC site

António P. P. Almeida October 25, 2011 02:34PM

RE: rewrite don't work in a multilanguage MVC site

Fernando García Torres October 25, 2011 03:02PM

Re: rewrite don't work in a multilanguage MVC site

Francis Daly October 25, 2011 04:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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