Files
ak 263b98b218 Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
2026-08-12 01:15:38 +08:00

811 B
Raw Permalink Blame History

路由与 .shtml 后缀

Laravel 没有全局 route suffix 配置(不像某些框架的 url_suffix)。LaraBlog 用显式路由兼容 sablog

// routes/legacy.php
Route::get('/show-{id}.shtml', ...);
Route::get('/category-{cid}.shtml', ...);
Route::get('/archives.shtml', ...);
Route::get('/login.shtml', ...);
// ...

规则

  1. 内容向 GET 优先提供 .shtml(及必要的 index.php?action= 兼容)
  2. 新 canonical 可并存(如 /tag/{name}/posts/{slug} → 301 到 show-id
  3. 不要指望「所有 GET 自动加 .shtml」;新增页面请在 legacy.php 写明后缀
  4. API 走 /api/v1不加 .shtml

验收

php artisan route:list 应能看到主要 .shtml 路由;tests/Feature/BlogFrontendTest 覆盖核心路径。