.htaccess Redirect Generator
Build Apache .htaccess rules without memorizing mod_rewrite syntax — 301/302 redirects, force HTTPS, and www normalization. Copy the generated block straight into your server config.
Custom redirects
Generated .htaccess
RewriteEngine On
# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [L,R=301]
# Custom redirects
Redirect 301 /old-page /new-page
How to use .htaccess Redirect Generator
Generate .htaccess redirect rules online. Create 301/302 redirects, www and HTTPS forcing, and RewriteRule snippets for Apache. Free and private.
- Open .htaccess Redirect Generator using the tool above — no sign-up needed
- Enter your data or upload a file (processed entirely in your browser)
- Click the action button and get your result instantly
- Copy to clipboard or download your result
Your data never leaves your device — 100% private processing.
Frequently Asked Questions
Get weekly tool tips & updates
New tools, power-user tips, and productivity hacks — delivered free every Friday.
No spam, ever. Unsubscribe with one click.
Why use .htaccess Redirect Generator?
- No installation — use directly from any browser
- Handles large inputs without crashing or timeouts
- Syntax highlighting and formatted output for readability
- Copy to clipboard shortcut for fast workflow integration
Common use cases
- Validate and format JSON responses from APIs
- Encode/decode Base64 strings during debugging
- Generate UUIDs for database seeds or test data
- Minify CSS or JavaScript before deployment
- Diff two code snippets to spot regressions
Related Developer Tools
robots.txt Generator
Generate a robots.txt file for your website. Set user-agents, allow/disallow rules, crawl-delay, and sitemap URL. Free, private robots.txt builder.
.gitignore Generator
Generate a .gitignore file for your project. Pick languages, frameworks, and tools to build a ready-to-use git ignore file. Free and private.
URL Encoder / Decoder
Encode and decode URLs and URL components online. Convert special characters to percent-encoding and back instantly — free, private, and fast.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Includes syntax highlighting, error detection, and a collapsible tree view — free, private, in-browser.
Regex Tester
Test and debug regular expressions online. See live matches, capture groups, and replace output. Free, private, instant.
Base64 Encoder & Decoder
Encode text or files to Base64, or decode Base64 strings back to text. Fast, free, and runs entirely in your browser.
Explore all Developer Tools.