horoskop, recepti in galerija ven s folx.tv: pripomocki z naslovnice, povezave iz glave in noge, poti 301 na naslovnico, iz sitemapa (GA4: 318 ogledov od 96.307 v 28 dneh)
This commit is contained in:
+2
-2
@@ -147,8 +147,8 @@ export async function registerRoutes(
|
||||
// POZOR: tu smejo biti samo poti, ki jih pozna React router v App.tsx.
|
||||
// Prej so bile "/news", "/video", "/galerie" — teh poti ni, zato je Google
|
||||
// dobival soft 404. Prave so "/category/News", "/videos", "/gallery".
|
||||
const staticPaths = ["/", "/category/News", "/videos", "/gallery",
|
||||
"/horoskop", "/rezepte", "/empfang-folx-tv", "/ueber-uns",
|
||||
const staticPaths = ["/", "/category/News", "/videos",
|
||||
"/empfang-folx-tv", "/ueber-uns",
|
||||
"/kontakt", "/impressum", "/datenschutz"];
|
||||
const urls: string[] = [];
|
||||
for (const p of staticPaths) {
|
||||
|
||||
@@ -339,6 +339,12 @@ export function serveStatic(app: Express) {
|
||||
"Aktuelles": "",
|
||||
};
|
||||
const pathOnly = url.split("?")[0].split("#")[0];
|
||||
// 30. 8. 2026: horoskop, recepti in galerija so ukinjeni. Stare povezave
|
||||
// ne smejo v 404, zato gredo trajno na naslovnico.
|
||||
if (/^\/(horoskop|rezepte|gallery|galerie)(\/.*)?$/.test(pathOnly)) {
|
||||
res.redirect(301, "/");
|
||||
return;
|
||||
}
|
||||
if (/^\/aktuelles\/?$/.test(pathOnly)) {
|
||||
res.redirect(301, `${NEWS_HOST}/`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user