URL Rewriting Tool
Convert dynamic URLs with query strings into clean SEO-friendly static URLs in multiple rewrite formats
About URL Rewriting
- Better for SEO
- Easy to remember
- Higher CTR
?id=1&cat=5
/page/1/5/
A URL rewriting tool converts dynamic URLs with query parameters into clean, SEO-friendly static URLs. It generates rewrite rules for web servers (e.g., Apache mod_rewrite) so that ugly URLs like page.php?id=1&cat=2 become readable URLs like page-id-1-cat-2.html. The tool helps improve SEO, user experience, and link structure.
What is URL Rewriting Tool?
The URL Rewriting Tool is a free online tool that takes a dynamic URL with query parameters and produces multiple rewrite formats. You paste a URL such as https://www.domain.com/test.php?categoryid=1&productid=10, and the tool parses it to extract the host, path, and query string. It generates four types of rewrite rules: Type 1 uses hyphens (e.g., test-categoryid-1-productid-10.html), Type 2 uses slashes (e.g., test/categoryid/1/productid/10.html), Type 3 uses hyphens with trailing slash (e.g., test-categoryid-1-productid-10/), Type 4 uses slashes with trailing slashes (e.g., test/categoryid/1/productid/10/). For each type, the tool outputs the Apache RewriteRule and example URLs. The URL must contain a query string; otherwise the tool reports an error. The tool is designed for dynamic URLs with parameters.
Dynamic URLs with query strings are common in content management systems, e-commerce platforms, and custom web applications. While functional, they can be long, ugly, and less memorable. Search engines and users generally prefer clean URLs. The URL Rewriting Tool automates the process of converting these dynamic URLs into SEO-friendly static formats. It generates the exact Apache mod_rewrite rules you need to add to your .htaccess file. Each format has different aesthetics: hyphen-based URLs are compact, slash-based URLs resemble directory structures. Choose the format that best fits your site's design and SEO strategy.
Implementing URL rewriting requires server configuration. For Apache, add the generated rules to your .htaccess file in the document root or the directory that handles the URLs. Ensure mod_rewrite is enabled. The rules use regex capture groups to map the clean URL segments back to query parameters. Your application must be able to read these parameters. Many frameworks (e.g., WordPress, Laravel) have built-in support. For custom PHP, use $_GET to read the parameters. When migrating from dynamic to clean URLs, set up 301 redirects from old URLs to new ones to preserve SEO value. The tool generates the rewrite rules; you are responsible for implementing them and testing. Use a staging environment first. Verify that all parameter combinations work correctly. Check that relative links and canonical URLs are updated.
The tool requires a URL with a query string. If your URL has no query parameters, the tool will report an error. Example valid input: https://example.com/page.php?id=1&cat=2. The tool parses the query string and generates rules for each parameter. The output includes the RewriteRule and the internal mapping. The example URLs show the clean format with the actual values from your input. The format example shows the pattern with placeholders. Use the example to verify the rule works before deploying. The tool supports URLs with or without a filename in the path. For /index.php?param=1, the file is index.php. For /?param=1, the file may be empty depending on the path. The tool handles both cases. The generated rules are designed for Apache. If you use Nginx, you will need to convert the rewrite logic. Nginx uses a different syntax for capturing and redirecting.
Who Benefits from This Tool
Web developers and system administrators use it to configure Apache mod_rewrite or similar. SEO professionals improve URL structure for search engines. Content managers migrate from dynamic to static URLs. E-commerce site owners clean product and category URLs. Anyone who needs to convert query-string URLs to clean, readable URLs can benefit.
Key Features
Four Rewrite Formats
Type 1: parameter-name-value with hyphens, ending in .html. Type 2: parameter-name/value with slashes, ending in .html. Type 3: same as Type 1 but with trailing slash. Type 4: same as Type 2 but with trailing slashes. Each format has different aesthetics and SEO implications.
Type 1 produces compact URLs like product-categoryid-1-productid-10.html. Type 2 produces directory-style URLs like product/categoryid/1/productid/10.html. Type 3 and 4 use trailing slashes, which some sites prefer for consistency. Search engines can index all formats; choose based on your site's design. Hyphen-based URLs are common for SEO. Slash-based URLs can imply hierarchy. The tool generates the exact RewriteRule pattern for each format. The pattern uses regex capture groups ($1, $2, etc.) to map the clean URL back to query parameters.
Apache RewriteRule Output
For each type, the tool outputs the RewriteRule and RewriteCond directives needed for Apache. The rules map the clean URL back to the original query string.
Example URLs
Example URLs show the actual clean URL with the current parameter values, and a format example with placeholder (Any Value) for documentation.
Host and Path Handling
The tool correctly handles paths with or without a filename. It extracts the path, file, and query parameters for accurate rule generation.
Port and Scheme Support
URLs with custom ports and schemes (http/https) are supported. Example URLs include the full scheme and host.
How to Use
- Paste or type a dynamic URL that includes a query string (e.g., ?param1=value1¶m2=value2).
- Complete the captcha if required.
- Click the process button.
- Review the four rewrite types and their generated rules and example URLs.
- Copy the RewriteRule and related directives for your Apache .htaccess or config.
- Configure your web server to use the rules. Ensure mod_rewrite is enabled.
Common Use Cases
- Converting product URLs for e-commerce sites
- Creating SEO-friendly category and archive URLs
- Migrating from dynamic to static URL structure
- Configuring Apache mod_rewrite rules
- Documenting URL structure for development teams
- Improving user experience with readable URLs
- Reducing URL length for sharing and tracking
- Standardizing URL format across a site
Tips & Best Practices
Choose a format that matches your site's style and is consistent across pages. Type 1 (hyphen) is common for SEO. Ensure your server supports the chosen format (trailing slashes may need redirects). Test the rules in a staging environment before production. Consider 301 redirects from old URLs to new ones when migrating. Keep parameter names short and meaningful. Use URL encoding for values that contain special characters.
Limitations & Notes
The tool generates rules for Apache mod_rewrite. Other servers (Nginx, IIS) require different syntax. The tool assumes a specific URL structure; complex or nested parameters may need manual adjustment. The generated rules are templates; you may need to adapt them for your server configuration. The tool does not implement the rules; it only generates them. You must add them to your .htaccess or server config.