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/SBogers72/glashelder.pro/app/routes.php
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

// The routes for the site
$routes = function(){
    Route::get('/', 'Komma\Controllers\PageController@index');
    Route::get('/disclaimer', 'Komma\Controllers\PageController@disclaimer');
    Route::get('/privacyverklaring', 'Komma\Controllers\PageController@privacy');

    Route::get('sitemap.xml', ['uses'=>'SEOController@sitemap']);
    Route::get('robots.txt', ['uses'=>'SEOController@robots']);

    App::missing(function($exception){
        return Response::view('layouts.404', [], 404);
    });
};

$redirect = function(){
    Route::any('/{any?}', function(){
        return Redirect::away('http://glashelder.pro', 301);
    })->where('any', '.+');
};

// Redirect all subdomains with status 301
Route::group(['domain' => '{subdomain}.glashelder.pro'], $redirect);
Route::group(['domain' => '{subdomain}.redigerenteksten.nl'], $redirect);
Route::group(['domain' => '{subdomain}.glasheldereteksten.nl'], $redirect);
Route::group(['domain' => 'redigerenteksten.nl'], $redirect);
Route::group(['domain' => 'glasheldereteksten.nl'], $redirect);

// Create the routes for these domains
Route::group(['domain' => 'glashelder.pro'], $routes);
Route::group(['domain' => 'localhost'], $routes);

// Redirect all other domains with status 301
Route::group(['domain' => '{domain}'], $redirect);