Welcome! Log In Create A New Profile

Advanced

Re: nginx redirect

April 22, 2011 12:46AM
После обновления до 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 - нет

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

nginx redirect

neon_cyrex April 06, 2011 02:05PM

Re: nginx redirect

Sergey Shepelev April 06, 2011 02:20PM

Re: nginx redirect

neon_cyrex April 07, 2011 12:30AM

Re: nginx redirect

Igor Sysoev April 07, 2011 12:38AM

Re: nginx redirect

neon_cyrex April 11, 2011 02:59PM

Re: nginx redirect

Igor Sysoev April 11, 2011 03:06PM

Re: nginx redirect

neon_cyrex April 22, 2011 12:46AM

Re: nginx redirect

neon_cyrex April 25, 2011 12:01PM

Re: nginx redirect

Alexander Kochetov April 22, 2011 01:06AM

Re: nginx redirect

neon_cyrex April 26, 2011 05:27AM

Re: nginx redirect

Vladimir Sopot February 25, 2015 08:54AM

Re: Re: nginx redirect

Styopa Semenukha February 25, 2015 11:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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