diff --git a/.gitignore b/.gitignore index 3359153b..e8928b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ # production /build +/dist # misc .DS_Store diff --git a/graff.estate.conf b/graff.estate.conf index 2562ce02..39660c26 100644 --- a/graff.estate.conf +++ b/graff.estate.conf @@ -18,9 +18,18 @@ server { # index.html fallback location / { - # try_files $uri $uri/ /index.html; - try_files $uri $uri.html $uri/ /index.html; + # Убираем trailing slash и редиректим + rewrite ^/(.*)/$ /$1 permanent; + + # Пробуем найти файл, затем с .html, затем 404 + try_files $uri $uri.html /404.html; } + + # Явная обработка 404 + # error_page 404 /404.html; + # location = /404.html { + # internal; + # } location /api { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3e4a289e..76df050e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -9,6 +9,9 @@ import ResultsPopup from "@/components/modals/ResultsPopup"; import dynamic from "next/dynamic"; export const metadata: Metadata = { + verification: { + yandex: "2d8545f95b05412c", + }, title: "Интерактивные решения для застройщиков", description: "Помогаем девелоперам эффективно демонстрировать свой объект. Продавать больше и быстрее.", diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index a04dc746..6c21ed63 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -1,8 +1,7 @@ -import { redirect, RedirectType } from "next/navigation"; import MainLayout from "./(main)/layout"; import { NotFoundPage } from "@/components/pages/NotFoundPage"; -export default function Page() { +export default function NotFound() { return ( diff --git a/src/components/pages/MainPage/Map/Slider.tsx b/src/components/pages/MainPage/Map/Slider.tsx index 55e1f191..3138d254 100644 --- a/src/components/pages/MainPage/Map/Slider.tsx +++ b/src/components/pages/MainPage/Map/Slider.tsx @@ -201,8 +201,7 @@ export function Slider({ mapPoint }: { mapPoint?: IMapProject[] }) {