Too many services/ports/ip numbers in your network to remember?

Last Updated or created 2025-12-15

Use a web server with a simple php script.

<?php
$host = $_SERVER['HTTP_HOST'];

$redirects = [
    'torrent.local'     => 'http://192.168.1.1:9091/',
    'nzb.local'     => 'http://192.168.1.1:8080/',
    'squeezebox.local'  => 'https://192.168.1.2:9000/',
    'squeeze.local'  => 'https://192.168.1.2:9000/',
];

if (isset($redirects[$host])) {
    header("Location: " . $redirects[$host], true, 302);
    exit;
}

http_response_code(404);
echo "Unknown host";

Add your webservers IP number to your local DNS server or hosts file

192.168.1.4 torrent.local
192.168.1.4 nzb.local
192.168.1.4 squeeze.local
192.168.1.4 squeezebox.local

Now you can use http://nzb.local in your browser and you will be redirected to http://serverip:port
No need to remember IP numbers or ports

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *