From c02fb063c73ecef8c80f0175734ebb225041e250 Mon Sep 17 00:00:00 2001 From: ak Date: Tue, 11 Aug 2026 23:05:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=87=E7=AD=BE/=E6=96=87=E7=AB=A0/?= =?UTF-8?q?=E5=88=86=E7=B1=BB=20slug=20=E8=B7=AF=E7=94=B1=E7=BA=A6?= =?UTF-8?q?=E6=9D=9F=E6=94=BE=E5=BC=80=E4=B8=BA=20[^/]+=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=B8=AD=E6=96=87=E6=A0=87=E7=AD=BE=EF=BC=88=E5=A6=82?= =?UTF-8?q?=20/tags/=E9=9A=8F=E7=AC=94.shtml=EF=BC=89=EF=BC=8C.shtml=20?= =?UTF-8?q?=E5=AD=97=E9=9D=A2=E5=90=8E=E7=BC=80=E4=BF=9D=E8=AF=81=E4=B8=8D?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/web.php | 12 ++++++------ .../Bn1FWtZHtTd1UYyM1DdW4HsTrg939kwAthumb.jpg | 1 + .../RdqOTyotPbfClXmz6MTjiPnfu4x26eT1.jpg | 1 + .../1FuaptoLlj2kxnK0GqvEssNd8EH8nV7Qthumb.jpg | 1 + .../7CQeNRXlrtGJ2ujefbpaQsfsqYFQLkAU.jpg | 1 + .../5eHYdyy9ISOtArR0jMkUUUscR48kDnY4thumb.jpg | 1 + .../OgJAQ1TjQPvPt4BvjCs7XTgugB49oX3u.jpg | 1 + .../NyarIq9qaphigFn6tWIIY25lCdA4pcgvthumb.jpg | 1 + .../rFNwsNTMXSkBXLfezp8AAGxmn75ERW6K.jpg | 1 + .../RvlY5MbdR16GJx9vvIDJWJ6iDHQ4ri3h.jpg | 1 + .../x6KVw2Inu1Z71Fxn9jbpu8vH57CojTGdthumb.jpg | 1 + 11 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/Bn1FWtZHtTd1UYyM1DdW4HsTrg939kwAthumb.jpg create mode 100644 storage/media-library/temp/CofjjubHAUAmHrIPWIEp3gbckCTLqi1g/RdqOTyotPbfClXmz6MTjiPnfu4x26eT1.jpg create mode 100644 storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/1FuaptoLlj2kxnK0GqvEssNd8EH8nV7Qthumb.jpg create mode 100644 storage/media-library/temp/JkoTCLLjsWm1Jld1nlKlTCALbGkueHkc/7CQeNRXlrtGJ2ujefbpaQsfsqYFQLkAU.jpg create mode 100644 storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/5eHYdyy9ISOtArR0jMkUUUscR48kDnY4thumb.jpg create mode 100644 storage/media-library/temp/LiV7ScEAKto32bxLwJuwTCQ8YTQ9e9ql/OgJAQ1TjQPvPt4BvjCs7XTgugB49oX3u.jpg create mode 100644 storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/NyarIq9qaphigFn6tWIIY25lCdA4pcgvthumb.jpg create mode 100644 storage/media-library/temp/hOU9qm36O6AdB8B1fANNno9jqsyZudlL/rFNwsNTMXSkBXLfezp8AAGxmn75ERW6K.jpg create mode 100644 storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/RvlY5MbdR16GJx9vvIDJWJ6iDHQ4ri3h.jpg create mode 100644 storage/media-library/temp/iLSnHAp29o6u2yXpwAoP3LDASoHRTptc/x6KVw2Inu1Z71Fxn9jbpu8vH57CojTGdthumb.jpg 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