[web-downloads] main: Add file for 404 with redirect logic
| From: | Shivam Mathur | Date: | Wed, 14 Aug 2024 12:40:13 +0000 |
| Subject: | [web-downloads] main: Add file for 404 with redirect logic | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-31947@lists.php.net to get a copy of this message | ||
Author: Shivam Mathur (shivammathur)
Date: 2024-08-14T18:09:39+05:30
Commit: https://github.com/php/web-downloads/commit/ffe3fbe59c807d74e4e5247dfcecf1fcb2f54741
Raw diff: https://github.com/php/web-downloads/commit/ffe3fbe59c807d74e4e5247dfcecf1fcb2f54741.diff
Add file for 404 with redirect logic
Changed paths:
A public/redirect.php
Diff:
diff --git a/public/redirect.php b/public/redirect.php
new file mode 100644
index 0000000..d166f3e
--- /dev/null
+++ b/public/redirect.php
@@ -0,0 +1,8 @@
+<?php
+if (preg_match('/Win32-vc/', $_SERVER['REQUEST_URI'])) {
+ $fixed = str_replace( 'Win32-vc', 'Win32-VC',
$_SERVER['REQUEST_URI'] );
+ header("Location: $fixed", true, 301);
+ exit();
+}
+
+header('Location: /', true, 404);