Get your free beta license ↗
CMDCommand · run as root on the server · domain family

urbestack-domain-redirect-add

First published 3 Oct 20260.1.0Unchanged since publication

Usage

# urbestack-domain-redirect-add --name DOMAIN --source PATH --target URL-OR-PATH [--code 301|302] [--match prefix|exact] [--keep-query on|off] [--dry-run]

Description

From the command's --help output
Adds an HTTP redirect from a path on a domain. Use --source /old for a path on the domain. The
default, --match prefix, redirects the source path and everything beneath it. With that match
type, --source / redirects the whole site. Use --match exact to redirect only the specified
path.

Set --target to a path starting with / on the same domain or an absolute HTTP or HTTPS URL.
Leave query strings and fragments out of the target. The redirect keeps the request's query
string by default. Use --keep-query off to drop it. The default status code is 301 for a
permanent redirect. Use --code 302 for a temporary redirect.

A prefix redirect rejects a site-relative target equal to or beneath its source path. Each
source path can have one redirect of each match type.

Options

Find other commands that accept these options

Same in the API

This operation runs the command.

More in domain

11 commands, by what they work onView all commands in this family →
urbestack-domain-
urbestack-domain-alias-
urbestack-domain-modsec-
urbestack-domain-redirect-
Generated from release 0.2.35 (current) · urbestack-domain-redirect-add --help outputThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/commands/urbestack-domain-redirect-add/