Welcome! Log In Create A New Profile

Advanced

Как настроить 301й редирект на nginx

December 21, 2014 08:20AM
Нужно сделать редирект с страниц вида /цифры_буквы_дефис_1/shopby/цифры_буквы_дефис_2.html
на /цифры_буквы_дефис_1.html.
Например с /196-vse-dlja-zhenschin/shopby/sisley-rimowa-ianis_chamalidy.html на 196-vse-dlja-zhenschin.html
Как изменить конфиг сайта?

Сейчас настройки сайта такие:

server {
server_name moda-spb.ru www.moda-spb.ru;
listen 176.9.36.66;
root /var/www/moda-spb.ru;
index index.php;

location / {
index index.html index.php;
try_files $uri $uri/ @handler;
expires 30d;
}

location ^~ /(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
location /var/export/ { internal; }
location /. { return 404; }
location @handler { rewrite / /index.php; }
location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
location ~* .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_pass php-fpm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
include fastcgi_params;
}
}
Subject Author Posted

Как настроить 301й редирект на nginx

Gavich December 21, 2014 08:20AM

Re: Как настроить 301й редирект на nginx

Vladimir Getmanshchuk December 21, 2014 03:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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