New Page Structure, SEO Polish & Multi-Game Safety
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.phpnow runs exclusively as the public landing page (SEO header, game selection, new-game form) — even with an activegameid, the page stays visible as the landing page via$is_public_page = true- The new
start.phpis 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.phponce a game is active —startgame.phpand 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 GUARDin the error log
🔗 Canonical URL Fix
- Google Search Console flagged
/index.phpand/as two separate URLs emitting different canonicals — even though both served the same content header.phpnow normalises/index.php→/for the<link rel="canonical">tag, on bothfootballfranchise.deandfootball-franchise.com- The
www-vs-non-wwwcanonicalisation was already correct — visits towww.footballfranchise.de/index.phpnow consistently emitcanonical → https://footballfranchise.de/
🕸️ AdSense-Ready: 19 More Pages
- The
$allow_nogame_ingameflag 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.phpnow protects game ID 1 (the seed/demo game) from being auto-deleted after 30 days of inactivity- Belt & braces: a
WHERE id <> 1clause in theSELECTplus 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.