Redirect Checker
Follow a link and see every redirect on the way.
The Mod Rewrite Generator is designed to help you convert long, complex dynamic URLs into clean, search-engine-friendly static URLs. Static URLs are generally preferred by search engines because they are easier to crawl, index, and understand. They also tend to look cleaner and more trustworthy to users compared to dynamic URLs filled with multiple parameters and query strings.
This tool works by generating rewrite rules for the Apache mod_rewrite module, which allows URLs in one format to be transparently rewritten into another. mod_rewrite is especially useful for websites that rely on dynamic content, such as those powered by databases or content management systems, as it helps present that content in a format that search engines can more easily process.
By using this generator, you can quickly transform lengthy dynamic URLs into short, readable static URLs without changing how your site functions behind the scenes. The result is improved search engine visibility, cleaner links for sharing, and a better overall experience for both users and search engines.
Enter your dynamic URL and click Rewrite URL to generate your new URL:
For example, you may enter the URL:
https://www.domain.com/cgi-bin/shop.php?cmd=product&category=vehicles&product=bus
and transform it into
https://www.domain.com/shop/vehicles/bus.html
Select parameters that should be present in the rewritten URL. By default, only the values of parameters are included. You may add both the name and value to the rewritten URL or remove a parameter completely.
| Parameter | Original | Value | Name & Value | None |
|---|
Your URL is turned into a rule in your browser and is never sent anywhere. Always test a new rule on a copy of your site first.
The mod rewrite generator is a great tool to assist you in creating mod rewrite rules for your htaccess file.
Do not include names of the parameters unless the name is a keyword. Include all the values unless one is always the same.
Too many slashes reduce the relevance of the URL, and a dash is better than an underscore for separating keywords.
Add the rule, open the new URL, and check that the right page loads. Keep a copy of your original .htaccess.
No. The rule makes the new, clean address work: when a visitor (or search engine) asks for the new URL, your server quietly loads the old dynamic page. Links on your site need to be changed to the new addresses yourself. To send the old address to the new one, add a separate 301 redirect.
In the .htaccess file in the root folder of your site, on a server running Apache. Make a copy of the file first, then add the lines at the end. Your host must have mod_rewrite and AllowOverride turned on, which most do.
Value puts only the value in the new address (/vehicles/). Name & value puts both (/category-vehicles), useful when the name is a keyword. None leaves the parameter out, and the rule then passes its original value on every time, so use it only for parameters that never change.
Dashes are best for search engines. Pick one that does not appear inside your values, such as a dash when a value is “red-car”, or the rule cannot tell where one value ends.
Remove the Options +FollowSymLinks line, because some hosts do not allow it. If the error stays, restore your copy of the file and ask your host whether mod_rewrite is on.
Yes. The Nginx line goes inside your server block, then reload Nginx. Nginx does not use .htaccess files.
No. The rule is made in your browser.
Follow a link and see every redirect on the way.
Create the .htaccess code for custom error pages.
See the HTTP headers a website sends back.
Test whether a web page is sent compressed.