HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/honger.komma.pro/routes/oldRoutes.php
<?php

// Redirect old routes
$location = '';
switch(Request::path())
{
    // Main pages
    case 'portfolio':
        $location = 'cases';
        break;
    case 'klanten':
        $location = 'referenties';
        break;
    case 'offerte-aanvragen':
        $location = 'gesprek-plannen';
        break;
    case 'ikhebhonger':
        $location = 'vacatures';
        break;
    case 'webdesign-budel':
        $location = 'diensten/website';
        break;
    case 'website-of-webshop':
        $location = 'diensten/webshop';
        break;

    // Existing cases
    case 'portfolio/tops-wtw-filters':
        $location = 'cases/tops-wtw-filters';
        break;
    case 'portfolio/tandarts-maas':
        $location = 'cases/tandarts-maas';
        break;
    case 'portfolio/promic-b-v':
        $location = 'cases/promic';
        break;

    // Old services
    case 'diensten/strategisch-advies':
        $location = 'diensten/strategie';
        break;
    case 'diensten/identiteit-bepalen':
        $location = 'diensten/kernwaardentraject';
        break;

}

// Non-existing cases
if(empty($location) && starts_with(Request::path(),'portfolio'))
{
    $location = 'cases';
}

// Redirect to new location
if( ! empty($location))
{
    header('location: /' . $location, true, 301);
    exit;
}