Htaccess Redirect Generator

Generate redirect rules from old and new paths you enter.

Runs in your browser. Nothing is uploaded — your input is processed on this device and discarded when you close the tab.

Htaccess Redirect Generator

How to use this tool

  1. Enter your values in the fields above.
  2. Press Generate to see the result.
  3. Use Load sample to try the worked example, Copy result to copy it, or Clear to start again.

Worked example

The sample generates a 301 rule for /old-page to /new-page and a 302 rule for /old-blog to /blog.

What this tool does not do / Limits

Generated rules are plain text for you to review and place in your own server configuration. Test them on staging first; a wrong rule can break links.

Frequently asked questions

Do I paste this anywhere automatically?

No. Copy the rules, review them, and place them in your own server file yourself.

Which redirect types are supported?

301 for permanent and 302 for temporary redirects; anything else defaults to 301 and is noted.

Related tools