blob: a7511b685eec8bd8c04ee80b576b9e605b9b21cf [file] [log] [blame]
Adrià Vilanova Martínez4b0d8f12021-07-23 00:38:31 +02001<?php
2require_once('redirects.php');
3
4$path = $_GET['q'] ?? '/';
5foreach ($redirects as $r) {
6 if (preg_match($r['pattern'], $path) === 1) {
7 $location = preg_replace($r['pattern'], $r['redirect'], $path);
8 header('Location: '.$location);
9 exit;
10 }
11}
12
13http_response_code(404);