.htaccess Generator

Pick the rules you need (redirects, caching, security) and copy the Apache .htaccess code.

How to use .htaccess Generator

  1. Add redirect rules — from path, to path, and redirect type (e.g. 301).
  2. Toggle Force HTTPS if you want all traffic redirected to https.
  3. Copy the generated .htaccess rules into your Apache config.

Frequently asked questions

What's the difference between the 301 and 302 redirect options?

301 tells browsers and search engines the move is permanent, so ranking signals transfer to the new URL. 302 signals a temporary redirect that shouldn't transfer those signals. Use 301 for a permanent page move, 302 for something temporary.

Can I redirect a whole pattern of URLs, like /blog/* to /articles/*?

Not with the Redirects section — each entry uses a plain Redirect directive that matches one exact path, not a wildcard or regex pattern. Pattern-based redirects need a hand-written RewriteRule instead.

Does a redirect with an empty From or To field still get added?

No — a redirect only appears in the output once both its From and To fields have something entered; incomplete rows are silently skipped.

Community

Loading...