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
.phpor.asp) from the user, adding a small layer of security through obscurity.
How to use the URL Rewriter
- Enter the Dynamic URL: Provide the original URL that contains parameters, for example:
product.php?id=123&name=shoes. - Enter the Static URL: Type how you want the URL to appear in the browser, for example:
product/123/shoes. - Choose Your Server: Select between Apache (common on shared hosting) or Nginx (common on modern VPS).
- 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
.htaccessin your website's root directory. Ensuremod_rewriteis enabled on your server. - Nginx: You need to place this inside your
serverblock or a specificlocationblock. 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.