Developer tool

URL Rewriting

Generate clean SEO URL rewrite rules.

Online URL Rewriting Tool

Our URL Rewriting Tool helps you convert dynamic, complex URLs into static, SEO-friendly ones. It automatically generates the necessary code for your .htaccess (Apache) or nginx.conf files.

Why Rewrite Your URLs?

  • SEO Benefits: Search engines prefer "clean" URLs that include keywords rather than query strings (e.g., ?id=123).
  • User Experience: Clean URLs are easier for users to read, remember, and share.
  • Security: It hides the underlying technology (like .php or .asp) from the user, adding a small layer of security through obscurity.

How to use the URL Rewriter

  1. Enter the Dynamic URL: Provide the original URL that contains parameters, for example: product.php?id=123&name=shoes.
  2. Enter the Static URL: Type how you want the URL to appear in the browser, for example: product/123/shoes.
  3. Choose Your Server: Select between Apache (common on shared hosting) or Nginx (common on modern VPS).
  4. Copy the Code: The tool instantly generates the regex and rewrite rules. Copy this code and paste it into your server configuration file.

Example Transformation

  • Original: website.com/article.php?id=45&title=hello-world
  • Rewritten: website.com/article/45/hello-world

Important Considerations

  • Apache: You usually place this code in a file named .htaccess in your website's root directory. Ensure mod_rewrite is enabled on your server.
  • Nginx: You need to place this inside your server block or a specific location block. Nginx requires a reload (nginx -s reload) to apply changes.
  • Regex Safety: Our tool uses standard regular expressions. Always test your rules in a staging environment before deploying to production.

ToolsFactory simplifies technical SEO tasks so you can focus on building great content.