TontonTools

URL Rewriting Tool

Generate URL rewrite rules — clean, SEO-friendly URLs via .htaccess.

100% Free No signup Privacy-friendly Website Management
Updated Sep 2026
Share X / Twitter Facebook LinkedIn WhatsApp

How to use URL Rewriting Tool

  1. Specify the clean URL and the real URL it should map to.
  2. Generate the RewriteRule code — regex pattern with captured variables.
  3. Add to .htaccess at your site root — with RewriteEngine On at the top.
  4. Test on staging first — a syntax error 500s the whole site; verify with the Status Code Checker.

What is URL Rewriting Tool?

A URL rewriting tool generates the Apache mod_rewrite rules (.htaccess RewriteRule directives) that turn ugly, technical URLs into clean, readable ones — transforming product.php?id=42&cat=shoes into /shoes/product-42. The clean URL is what visitors see; the rewrite rule maps it invisibly to the real script behind it.

Clean URLs matter for SEO and usability: they're readable (users trust and remember them), keyword-bearing (a small ranking help), and shareable (no cryptic parameters). URL rewriting is how you get them without restructuring your actual files.

About the URL Rewriting Tool

Specify your URL pattern — the clean form you want and the real URL it maps to — and generate the RewriteRule code for your .htaccess.

Common rewrites: query strings to paths (?id=42 becomes /item/42 — the classic clean-URL transformation); removing file extensions (/about instead of /about.php); enforcing trailing-slash consistency; and pattern-based mapping (a whole category of URLs handled by one rule with captured variables). The rules use regular expressions to match the clean URL and rewrite it to the real one, with captured groups ($1, $2) passing the variable parts through.

Deployment and cautions: rules go in the .htaccess file at your site root, requiring RewriteEngine On first; Apache parses .htaccess per-request, so a syntax error 500-errors the whole site (test on staging, or be ready to revert). The regex is the tricky part — overly broad patterns can catch URLs they shouldn't or create loops, so test each rule. And a note: this is Apache-specific — Nginx uses different rewrite syntax (in server config, not .htaccess). For simpler needs — redirecting old URLs to new — our .htaccess Redirect Generator handles 301s; use rewriting when you're presenting clean URLs for existing dynamic content. Verify results with the Redirect Checker and Status Code Checker.

Frequently Asked Questions

Rewriting maps a clean URL to a real one INVISIBLY (the browser stays on the clean URL, the server serves the real content). Redirecting SENDS the browser to a different URL (the address changes). Rewriting is for presenting clean URLs; redirecting is for moving content.
Readability, trust and minor SEO benefit — /blog/seo-tips is memorable, shareable and keyword-bearing; /post.php?id=284 is none of those. Users and search engines both prefer clean, descriptive URLs.
In the .htaccess file at your Apache site root, after RewriteEngine On. Apache reads it per-request, so changes apply immediately — but a syntax error 500-errors the whole site, so test carefully and keep a backup to revert.
No — this generates Apache mod_rewrite (.htaccess) syntax. Nginx uses different rewrite/location directives in its server config (not per-directory .htaccess files). Check which server you run before applying; the concepts transfer but the syntax doesn't.
Usually an overly broad regex catching URLs it shouldn't, or a rule whose output matches its own pattern again (infinite loop). Make patterns specific, add conditions (RewriteCond) to exclude the target, and test each rule in isolation.

We use cookies for analytics and to keep the tools free via ads. See our Privacy Policy.