← All tool references

SEO Tools · not_available

Regex Redirect Builder

Regex Redirect Builder with transparent inputs and reviewable results.

Open public tool

Overview

Category
SEO Tools
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/regex-redirect-builder

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/regex-redirect-builder/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

source_pattern · string · required
Enter source pattern.
destination · string · required
Enter destination template.
platform · string · required
Enter platform. Accepted values: apache, nginx, cloudflare.
status · string · required
Enter status. Accepted values: 301, 302, 307, 308.
test_paths · string · required
Enter test paths.
{
    "type": "object",
    "properties": {
        "source_pattern": {
            "type": "string",
            "description": "Enter source pattern."
        },
        "destination": {
            "type": "string",
            "description": "Enter destination template."
        },
        "platform": {
            "type": "string",
            "description": "Enter platform.",
            "enum": [
                "apache",
                "nginx",
                "cloudflare"
            ]
        },
        "status": {
            "type": "string",
            "description": "Enter status.",
            "enum": [
                "301",
                "302",
                "307",
                "308"
            ]
        },
        "test_paths": {
            "type": "string",
            "description": "Enter test paths."
        }
    },
    "required": [
        "source_pattern",
        "destination",
        "platform",
        "status",
        "test_paths"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

rule · string
Redirect rule produced by the tool.
tests · array
Test results produced by the tool.
warnings · array
Warnings produced by the tool.
{
    "type": "object",
    "properties": {
        "rule": {
            "type": "string",
            "description": "Redirect rule produced by the tool."
        },
        "tests": {
            "type": "array",
            "description": "Test results produced by the tool."
        },
        "warnings": {
            "type": "array",
            "description": "Warnings produced by the tool."
        }
    },
    "additionalProperties": false
}

Regex Redirect Builder worked example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/regex-redirect-builder/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "source_pattern": "^/products/(.*)$",
    "destination": "/catalog/$1",
    "platform": "apache",
    "status": "301",
    "test_paths": "/products/widget\n/products/blue/item"
}'
{
    "ok": true,
    "data": {
        "slug": "regex-redirect-builder",
        "result": {
            "values": {
                "rule": "RewriteRule ^/products/(.*)$ /catalog/$1 [R=301,L]",
                "tests": [
                    {
                        "path": "/products/widget",
                        "matches": "Yes",
                        "destination": "/catalog/widget"
                    },
                    {
                        "path": "/products/blue/item",
                        "matches": "Yes",
                        "destination": "/catalog/blue/item"
                    }
                ],
                "warnings": [
                    {
                        "message": "Test in staging and review capture groups before deployment."
                    }
                ]
            },
            "display": {
                "display": "RewriteRule ^/products/(.*)$ /catalog/$1 [R=301,L]"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.