diff --git a/routes/web.php b/routes/web.php index 5716f54..d48ab8a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -31,15 +31,15 @@ Route::get('/', function () { return app(HomeController::class)->index(); })->name('home'); -Route::get('/posts/{slug}.shtml', [PostController::class, 'show'])->where('slug', '[A-Za-z0-9\-]+')->name('posts.show'); -Route::get('/posts/{slug}', fn (string $slug) => redirect()->route('posts.show', $slug, 301))->where('slug', '[A-Za-z0-9\-]+'); +Route::get('/posts/{slug}.shtml', [PostController::class, 'show'])->where('slug', '[^/]+')->name('posts.show'); +Route::get('/posts/{slug}', fn (string $slug) => redirect()->route('posts.show', $slug, 301))->where('slug', '[^/]+'); Route::post('/posts/{post}/comments', [CommentController::class, 'store'])->name('comments.store'); // 浏览量统计(独立端点,避开整页缓存,保证实时) Route::get('/track-view/{post}', fn (\App\Models\Post $post) => response($post->increment('views') ? '' : '', 204))->name('track-view'); -Route::get('/category/{slug}.shtml', [CategoryController::class, 'show'])->where('slug', '[A-Za-z0-9\-]+')->name('category.show'); -Route::get('/category/{slug}', fn (string $slug) => redirect()->route('category.show', $slug, 301))->where('slug', '[A-Za-z0-9\-]+'); +Route::get('/category/{slug}.shtml', [CategoryController::class, 'show'])->where('slug', '[^/]+')->name('category.show'); +Route::get('/category/{slug}', fn (string $slug) => redirect()->route('category.show', $slug, 301))->where('slug', '[^/]+'); Route::get('/archives.shtml', [ArchiveController::class, 'index'])->name('archives'); Route::get('/archives', fn () => redirect()->route('archives', [], 301)); @@ -51,8 +51,8 @@ Route::get('/archives/{year}/{month}', fn (string $year, string $month) => redir Route::get('/tags.shtml', [TagController::class, 'index'])->name('tags'); Route::get('/tags', fn () => redirect()->route('tags', [], 301)); -Route::get('/tags/{slug}.shtml', [TagController::class, 'show'])->where('slug', '[A-Za-z0-9\-]+')->name('tags.show'); -Route::get('/tags/{slug}', fn (string $slug) => redirect()->route('tags.show', $slug, 301))->where('slug', '[A-Za-z0-9\-]+'); +Route::get('/tags/{slug}.shtml', [TagController::class, 'show'])->where('slug', '[^/]+')->name('tags.show'); +Route::get('/tags/{slug}', fn (string $slug) => redirect()->route('tags.show', $slug, 301))->where('slug', '[^/]+'); Route::get('/search.shtml', [SearchController::class, 'index'])->name('search'); Route::get('/search', fn () => redirect()->route('search', [], 301)); diff --git a/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/Bn1FWtZHtTd1UYyM1DdW4HsTrg939kwAthumb.jpg b/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/Bn1FWtZHtTd1UYyM1DdW4HsTrg939kwAthumb.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/Bn1FWtZHtTd1UYyM1DdW4HsTrg939kwAthumb.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/RdqOTyotPbfClXmz6MTjiPnfu4x26eT1.jpg b/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/RdqOTyotPbfClXmz6MTjiPnfu4x26eT1.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/RdqOTyotPbfClXmz6MTjiPnfu4x26eT1.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/1FuaptoLlj2kxnK0GqvEssNd8EH8nV7Qthumb.jpg b/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/1FuaptoLlj2kxnK0GqvEssNd8EH8nV7Qthumb.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/1FuaptoLlj2kxnK0GqvEssNd8EH8nV7Qthumb.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/7CQeNRXlrtGJ2ujefbpaQsfsqYFQLkAU.jpg b/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/7CQeNRXlrtGJ2ujefbpaQsfsqYFQLkAU.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/7CQeNRXlrtGJ2ujefbpaQsfsqYFQLkAU.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/5eHYdyy9ISOtArR0jMkUUUscR48kDnY4thumb.jpg b/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/5eHYdyy9ISOtArR0jMkUUUscR48kDnY4thumb.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/5eHYdyy9ISOtArR0jMkUUUscR48kDnY4thumb.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/OgJAQ1TjQPvPt4BvjCs7XTgugB49oX3u.jpg b/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/OgJAQ1TjQPvPt4BvjCs7XTgugB49oX3u.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/OgJAQ1TjQPvPt4BvjCs7XTgugB49oX3u.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/NyarIq9qaphigFn6tWIIY25lCdA4pcgvthumb.jpg b/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/NyarIq9qaphigFn6tWIIY25lCdA4pcgvthumb.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/NyarIq9qaphigFn6tWIIY25lCdA4pcgvthumb.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/rFNwsNTMXSkBXLfezp8AAGxmn75ERW6K.jpg b/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/rFNwsNTMXSkBXLfezp8AAGxmn75ERW6K.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/rFNwsNTMXSkBXLfezp8AAGxmn75ERW6K.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/RvlY5MbdR16GJx9vvIDJWJ6iDHQ4ri3h.jpg b/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/RvlY5MbdR16GJx9vvIDJWJ6iDHQ4ri3h.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/RvlY5MbdR16GJx9vvIDJWJ6iDHQ4ri3h.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file diff --git a/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/x6KVw2Inu1Z71Fxn9jbpu8vH57CojTGdthumb.jpg b/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/x6KVw2Inu1Z71Fxn9jbpu8vH57CojTGdthumb.jpg new file mode 100644 index 0000000..7e754f4 --- /dev/null +++ b/storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/x6KVw2Inu1Z71Fxn9jbpu8vH57CojTGdthumb.jpg @@ -0,0 +1 @@ +fake-jpg \ No newline at end of file