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

22 lines
811 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 路由与 `.shtml` 后缀
Laravel **没有**全局 `route suffix` 配置(不像某些框架的 `url_suffix`)。LaraBlog 用**显式路由**兼容 sablog
```php
// 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` 覆盖核心路径。