ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nginx redirect


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: nginx redirect
  • From: "neon_cyrex" <nginx-forum@xxxxxxxx>
  • Date: Fri, 22 Apr 2011 00:46:29 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:References:In-Reply-To:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=kwHUMhfvZ206h0x+1olHM6bkC9iSOisIO1npGoEFV9M=; b=DduIOQLtnFHPXHRKNfQq4r410/gxirZbzhCtMTjQWmA1vslWx8VDe3Lqm6nus4owpNCxsNorBeCd67kkiQ/u0B7xZN0Ajp/fjJw7QtZdgiKLSNdMahAahRUUXq+aUaDa;
  • In-reply-to: <20110411190506.GC38374@xxxxxxxxx>
  • References: <20110411190506.GC38374@xxxxxxxxx>

После обновления до 1.0 редирект для
index.php перестал работать....

        location = /index.php$ {
            rewrite ^ http://адрес/ permanent;
        }

        location = /index.html {
            rewrite ^ http://адрес/ permanent;
        }

        location = / {
            try_files /index.php = 404;
# без этого страница не открывается,
браузер сообщает что запрос никогда не
завершится


            root           /home/services/www;
            fastcgi_pass   phpfcgi;
            fastcgi_param  SCRIPT_FILENAME 
/home/services/www/index.php;
            include        fastcgi_params;
        }

        location / {
            root   /home/services/www/;
            #index  index.php;
        }

        location ~ \.php$ {
            root           /home/services/www;
            fastcgi_pass   phpfcgi;
            fastcgi_param GEOIP_CITY_COUNTRY_CODE
$geoip_city_country_code;
            fastcgi_param GEOIP_CITY_COUNTRY_CODE3
$geoip_city_country_code3;
            fastcgi_param GEOIP_CITY_COUNTRY_NAME
$geoip_city_country_name;
            fastcgi_param GEOIP_REGION $geoip_region;
            fastcgi_param GEOIP_CITY $geoip_city;
            fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
            fastcgi_param GEOIP_CITY_CONTINENT_CODE
$geoip_city_continent_code;
            fastcgi_param GEOIP_LATITUDE $geoip_latitude;
            fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME 
/home/services/www$fastcgi_script_name;
            include        fastcgi_params;
        }


если захожу на http://адрес/index.html 
редирект срабатывает, а вот index.php - нет

подскажите где подводный камень.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,188841,192988#msg-192988


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.