From 8ccd622106b0e6d76f2d08e1ef530a1fa66ffb9b Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Tue, 20 May 2025 16:00:42 +0100 Subject: [PATCH 1/2] Add SEO-related route redirects --- routes/web.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/routes/web.php b/routes/web.php index 3e965c5d8..a56b9257d 100644 --- a/routes/web.php +++ b/routes/web.php @@ -110,6 +110,7 @@ Route::permanentRedirect('/view/1221652/challenges/careers-as-constellations', '/challenges/careers-as-constellations/'); Route::permanentRedirect('/view/1221912/blog/careers-linda-liukas/', '/blog/careers-linda-liukas/'); Route::permanentRedirect('/view/1221912/challenges/careers-as-constellations', '/challenges/careers-as-constellations/'); +Route::permanentRedirect('/view/1221651/challenges/careers-as-constellations', '/challenges/careers-as-constellations'); Route::get('/search/{term}', function ($term) { if (strtolower($term) === 'e twinning') { return redirect('/search', 301); @@ -118,6 +119,23 @@ // Optionally, handle other terms or return 404 abort(404); }); +Route::get('/{term}', function ($term) { + if (strtolower($term) === 'e twinning') { + return redirect('/search', 301); + } + + // Optional: handle unknown terms + abort(404); +}); +Route::permanentRedirect('/blog/codeeu-monday-and-tuesday-thousands-of-schools/1Lg7vYO/', '/blog/codeeu-monday-and-tuesday-thousands-of-schools/'); +Route::permanentRedirect('/2021/challenges/dance/', '/challenges/dance/'); +Route::permanentRedirect('/2021/challenges', '/challenges'); +Route::permanentRedirect('/blog/submit', '/blog'); +Route::permanentRedirect('/blog/top-programming-languages-for-kids-of-any-language/Introduction%20to%20Scratch', '/blog/top-programming-languages-for-kids-of-any-language/'); +Route::permanentRedirect('/blog/top-programming-languages-for-kids-of-any-language/ScratchEd', '/blog/top-programming-languages-for-kids-of-any-language/'); +Route::permanentRedirect('/hackathons/slovenia', '/hackathons'); +Route::permanentRedirect('/hackathons/greece', '/hackathons'); +Route::permanentRedirect('/blog/generation-code-born-at-the-library/\Users\Sara%20Petti\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\61RWWU83\coderdojo.com', '/blog/generation-code-born-at-the-library/'); //redirects end //Auth::loginUsingId(268354); From 5998bdc44859747acc6cbaf1fbfe35d6d236f372 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Wed, 21 May 2025 10:47:20 +0100 Subject: [PATCH 2/2] Add SEO-related route redirects --- routes/web.php | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/routes/web.php b/routes/web.php index a56b9257d..ef6e684c1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -66,7 +66,6 @@ use App\Http\Controllers\GeocodeController; use Illuminate\Support\Facades\Config; use App\Http\Controllers\EventsController; - //redirects start Route::permanentRedirect('/certificates/excellence/Excellence Certificate', '/certificates/excellence/2024'); Route::permanentRedirect('/certificates/excellence/Excellence%20Certificate', '/certificates/excellence/2024'); @@ -111,22 +110,7 @@ Route::permanentRedirect('/view/1221912/blog/careers-linda-liukas/', '/blog/careers-linda-liukas/'); Route::permanentRedirect('/view/1221912/challenges/careers-as-constellations', '/challenges/careers-as-constellations/'); Route::permanentRedirect('/view/1221651/challenges/careers-as-constellations', '/challenges/careers-as-constellations'); -Route::get('/search/{term}', function ($term) { - if (strtolower($term) === 'e twinning') { - return redirect('/search', 301); - } - - // Optionally, handle other terms or return 404 - abort(404); -}); -Route::get('/{term}', function ($term) { - if (strtolower($term) === 'e twinning') { - return redirect('/search', 301); - } - // Optional: handle unknown terms - abort(404); -}); Route::permanentRedirect('/blog/codeeu-monday-and-tuesday-thousands-of-schools/1Lg7vYO/', '/blog/codeeu-monday-and-tuesday-thousands-of-schools/'); Route::permanentRedirect('/2021/challenges/dance/', '/challenges/dance/'); Route::permanentRedirect('/2021/challenges', '/challenges'); @@ -135,7 +119,15 @@ Route::permanentRedirect('/blog/top-programming-languages-for-kids-of-any-language/ScratchEd', '/blog/top-programming-languages-for-kids-of-any-language/'); Route::permanentRedirect('/hackathons/slovenia', '/hackathons'); Route::permanentRedirect('/hackathons/greece', '/hackathons'); -Route::permanentRedirect('/blog/generation-code-born-at-the-library/\Users\Sara%20Petti\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\61RWWU83\coderdojo.com', '/blog/generation-code-born-at-the-library/'); + +Route::get('/search/{term}', function ($term) { + if (strtolower($term) === 'e twinning') { + return redirect('/search', 301); + } + + // Optionally, handle other terms or return 404 + abort(404); +}); //redirects end //Auth::loginUsingId(268354);