Loading
Loading/Simulating...
(Please do not close window!)
x
⚠️

New Page Structure, SEO Polish & Multi-Game Safety

Tino H. Tino H.

A major restructuring has landed: index.php is now a pure public landing page, while the in-game home has moved to the new start.php. On top of that: three safety nets preventing a user from ever having two active games at once in the DB, a critical canonical fix for Google and 19 additional pages running in no-game mode for the AdSense integration.

🏠 New Landing & Home Architecture

  • index.php now runs exclusively as the public landing page (SEO header, game selection, new-game form) — even with an active gameid, the page stays visible as the landing page via $is_public_page = true
  • The new start.php is the central in-game home and contains all former in-game homepage elements (money EOS, expiring contracts, standings, player leaders, etc.)
  • Menu item "START", clicks on the team name in the header and the home icon in the icon menu now link to start.php
  • "Play" and "Start" buttons correctly redirect to start.php once a game is active — startgame.php and all in-game error redirects were adjusted accordingly

🛡️ Multi-Active-Game Safeguards

  • Three layers of defence prevent a user from ever having two games marked active at the same time in the database:
  • Continuegame handler: now bulk-deactivates all of the user's cookie-owned games in a single SQL statement before activating the chosen one — no more race condition window
  • Newgame handler: before the INSERT, every pre-existing game in the user's cookie is also deactivated
  • Gameid resolution: if more than one active game is detected nonetheless, the extras are automatically deactivated and logged as MULTI-ACTIVE GUARD in the error log

🔗 Canonical URL Fix

  • Google Search Console flagged /index.php and / as two separate URLs emitting different canonicals — even though both served the same content
  • header.php now normalises /index.php/ for the <link rel="canonical"> tag, on both footballfranchise.de and football-franchise.com
  • The www-vs-non-www canonicalisation was already correct — visits to www.footballfranchise.de/index.php now consistently emit canonical → https://footballfranchise.de/

🕸️ AdSense-Ready: 19 More Pages

  • The $allow_nogame_ingame flag was rolled out to all central in-game pages: franchise, tradingblock, trade, players, freeagents, draft, teams, table, conference, division, schedule, players_stats, player_stats_leaders, halloffame, powerranking, players_watchlist, tradehistory, achievements, coins
  • Every one of them now renders its full HTML scaffold with empty tables when visited without an active gameid — perfect for the AdSense crawler to reference block IDs for ad slot placement

🧹 Cronjob Protection

  • cron_cleanup_old_games.php now protects game ID 1 (the seed/demo game) from being auto-deleted after 30 days of inactivity
  • Belt & braces: a WHERE id <> 1 clause in the SELECT plus an additional hard guard inside the delete loop

With the clean split between public landing page and in-game home, plus the multi-active-game safeguards, the app has become substantially more robust. In parallel, the crawler can now reach every important page — a huge step toward a productive SEO and AdSense integration.

« Blog