if ( $request_filename ~ msc ) {
rewrite ^ https://realebedev.ru/? permanent;
}
server {
listen 194.67.213.162:80;
server_name www.realebedev.ru;
rewrite ^ https://realebedev.ru$request_uri? permanent; #301 redirect
}
server {
listen 194.67.213.162:80;
server_name realebedev.ru;
root /home/admin/web/realebedev.ru/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/realebedev.ru.log combined;
access_log /var/log/nginx/domains/realebedev.ru.bytes bytes;
error_log /var/log/nginx/domains/realebedev.ru.error.log error;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/var/run/php/realebedev.ru.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location /error/ {
alias /home/admin/web/realebedev.ru/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
location /vstats/ {
alias /home/admin/web/realebedev.ru/stats/;
include /home/admin/web/realebedev.ru/stats/auth.conf*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include /home/admin/conf/web/nginx.realebedev.ru.conf*;
if ( $request_filename ~ index.html ) {
rewrite ^ https://realebedev.ru permanent;
}
if ( $request_filename ~ contacts.html ) {
rewrite ^ https://realebedev.ru/kontakty/? permanent;
}
if ( $request_filename ~ ipotechnie-kredity.html ) {
rewrite ^ https://realebedev.ru/uslugi-rieltora-pri-pokupke-kvartiry-v-ipoteku/? permanent;
}
if ( $request_filename ~ konsultacii.html ) {
rewrite ^ https://realebedev.ru/konsultatsiya-rieltora/? permanent;
}
if ( $request_filename ~ obmen-kvartir.html ) {
rewrite ^ https://realebedev.ru/obmen-kvartir-v-moskve-rieltor/? permanent;
}
if ( $request_filename ~ pokupka-kvartir.html ) {
rewrite ^ https://realebedev.ru/rieltor-dlya-pokupki-kvartiry/? permanent;
}
if ( $request_filename ~ prodaja-kvartir.html ) {
rewrite ^ https://realebedev.ru/rieltor-dlya-prodazhi-kvartiry/? permanent;
}
if ( $request_filename ~ rieltory.html ) {
rewrite ^ https://realebedev.ru/? permanent;
}
if ( $request_filename ~ source.html ) {
rewrite ^ https://realebedev.ru/? permanent;
}
if ( $request_filename ~ uslugi.html ) {
rewrite ^ https://realebedev.ru/uslugi-rieltora/? permanent;
}
if ( $request_filename ~ vukyp-kvartir.html ) {
rewrite ^ https://realebedev.ru/srochnyj-vykup-kvartir-v-moskve-rieltor/? permanent;
}
if ( $request_filename ~ zarybajnaya-nedvijimost.html ) {
rewrite ^ https://realebedev.ru/rieltor-po-zarubezhnoj-nedvizhimosti/? permanent;
}
if ( $request_filename ~ special ) {
rewrite ^ https://realebedev.ru/? permanent;
}
if ( $request_filename ~ msk ) {
rewrite ^ https://realebedev.ru/? permanent;
}
if ( $request_filename ~ msc ) {
rewrite ^ https://realebedev.ru/? permanent;
}
if ( $request_filename ~ sitemap.xml ) {
rewrite ^ https://realebedev.ru/sitemap.xml permanent;
}
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}