.htaccess Redirect Builder
Generate an Apache permanent redirect rule.
Read the guideRun the tool
The calculation runs in your browser. This tool does not send your input to JVR Software.
More information
Back to the toolWhat it is and when to use it
Apache Redirect Builder prepares a configuration snippet for forwarding an old URL to its replacement. It helps when you move a page, canonicalise a known path, or keep bookmarks working after a carefully planned site migration. It is intended for Apache configurations that support the directive shown.
How it works
Apache matches the configured source and tells a client to request the destination. A 301 indicates a permanent move and a 302 a temporary one. Apache’s context, module and rule order determine when a redirect applies. Prefix-based matching can cover extra path segments.
How to use it
- Enter the old site path and its intended replacement.
- Review the generated permanent 301 directive, and adapt the status if you first need a temporary redirect in staging.
- Test with the exact old path, neighbouring paths and a request carrying a query string.
Worked example
For an article moved from /old-guide to https://example.com/new-guide, first test the old path with a temporary redirect in a test environment. Check that Location points to the expected new page and that the new page itself returns the intended content.
Reading the result
The output is configuration text. Read which source is matched and how its matching rule treats a trailing slash and subpaths. Confirm status and Location after the server applies the rule. Redirect Trace can make accidental hops or loops visible on a public path you control.
Common mistakes and limits
The server may disallow .htaccess overrides or already have another routing rule. Check the host’s active configuration and prefer a single direct redirect. Permanent redirects can be cached, so verify the destination and neighbouring behavior before using a permanent status on a public site.
