URL Rewriting Tool

Convert dynamic URLs with query strings into clean SEO-friendly static URLs in multiple rewrite formats

  • 100% Free
  • Files stay private
  • Works in your browser
Try it now·URL Rewriting Tool
must include a ?query=string

Clean URLs are easier to read, share and rank. Rules are generated in your browser. Test them on a staging site before going live.

How it works

  1. Paste a dynamic URL

    On the Rewrite rules tab, enter a URL that has a ?query=string into the Dynamic URL box.

  2. Pick server and style

    Choose Apache (.htaccess) or Nginx under Server, then a Pretty URL style. The Clean URL follows the style and the rule follows both.

  3. Copy or download the rule

    Press Copy in the Rule box, or use the Download button to save the rule as .htaccess for Apache or nginx-rewrite.conf for Nginx.

Turn ugly dynamic URLs full of query strings into clean, SEO-friendly links, and get the exact Apache or Nginx rewrite rules that power them, generated instantly in your browser.

What is URL Rewriting Tool?

URL Rewriting Tool converts a dynamic URL like product.php?categoryid=1&productid=10 into a tidy, human-readable path and produces the server configuration needed to serve it. It also includes a slugifier that cleans any URL or path into a lowercase, hyphenated slug. Clean URLs are easier to read, share and rank, and this tool makes the switch painless.

Who Benefits from This Tool

  • Web developers who need correct rewrite rules without hand-writing regex.
  • SEO professionals replacing query-string URLs with descriptive paths.
  • PHP and legacy site owners modernising older dynamic pages.
  • System administrators comparing Apache and Nginx rewrite syntax.
  • Content editors who just want a clean slug for a new page.

Key Features

  • Four URL styles: key/value or values-only, joined by dashes or slashes.
  • Apache and Nginx output: ready-to-paste .htaccess rules or a server-block rewrite line.
  • Live clean-URL preview: see the pretty URL and what it rewrites back to.
  • Well-formed regex: capture groups map cleanly to the original query parameters.
  • Style comparison: preview all four formats side by side and switch between them.
  • Built-in slugifier: strip query strings, punctuation and casing into a single clean slug.
  • One-click download: save the rules as .htaccess or nginx-rewrite.conf.

How to Use

  1. Choose the Rewrite rules tab and paste a dynamic URL that includes a query string.
  2. Pick your server, Apache or Nginx, and select a pretty URL style.
  3. Review the generated clean URL and the rewrite rule shown below it.
  4. Copy the rule or download the config file and add it to your server.
  5. Or switch to the Slugify URL tab to turn any URL or path into a clean slug.

Common Use Cases

  • Migrating a PHP shop from product.php?id=… to /product/blue-shoes.
  • Generating .htaccess rules for a shared-hosting site.
  • Translating an existing Apache rewrite into its Nginx equivalent.
  • Creating consistent, readable slugs for blog posts and landing pages.
  • Cleaning up tracking-heavy URLs before publishing or sharing them.

Tips and Best Practices

  • Test new rewrite rules on a staging site before deploying to production.
  • Set up 301 redirects from old dynamic URLs so existing links and rankings carry over.
  • Prefer shorter, values-only styles for public-facing URLs, but keep them unambiguous.
  • Keep slugs lowercase and hyphenated. Avoid spaces, underscores and accents.
  • Back up your existing .htaccess before pasting in new rules.
  • Make sure mod_rewrite (Apache) is enabled on your server first.

Limitations and Notes

The rules are generated entirely in your browser from the URL you enter. Nothing is uploaded. They cover the common single-directory rewrite pattern and are a solid starting point, but complex sites may need additional conditions or edge-case handling. Always validate the generated regex against your real URLs and test on staging first. The tool requires a query string to build rewrite rules; a URL without one cannot be rewritten.

FAQs

A dynamic URL passes data through a query string, such as page.php?id=123&cat=5. This tool rewrites that into a clean path and generates the rule that maps the path back to the original parameters.

Yes. You can toggle between Apache (.htaccess) rules and an equivalent Nginx server-block rewrite line, and download either.

Key/value with dashes or slashes keeps parameter names in the path; values-only with dashes or slashes drops the names for the shortest possible URL. You can preview and switch between all four.

The rewrite itself serves clean URLs, but you should add 301 redirects from the old dynamic URLs so existing links and search rankings transfer to the new paths.

It takes any URL or path, removes the query string and file extension, and converts punctuation, accents and casing into a clean lowercase hyphenated slug.

No. All parsing, rule generation and slugifying happen locally in your browser.

More Text Tools

Other tools in Text Tools.

All Text Tools