Type a tool name, for example "keyword density" or "transcript".
Enter a URL
This URL rewriting tool turns a dynamic URL with query parameters, such as test.php?firstid=1&secondid=10, into two clean URL styles and generates the matching Apache .htaccess rewrite rules. It is built for site owners and developers who want readable, search-friendly addresses without writing mod_rewrite patterns by hand.
URL rewriting is a server-side technique that lets a clean, readable address load a page that is actually produced by a script with query parameters. Visitors and search engines see the clean address, while the server quietly maps it back to the dynamic one.
A dynamic URL has a question mark followed by name and value pairs, for example product.php?cat=5&id=42. The same page could be reached at product-cat-5-id-42.htm or product/cat/5/id/42/. Both are easier to read, say aloud and share than the original.
Google's Search Central documentation recommends simple, descriptive URLs that people can understand, and advises against long strings of parameters where you can avoid them. Clean URLs do not guarantee higher rankings, but they make links more trustworthy-looking and easier to read in search results, chats and bookmarks.
You only need one input: the full dynamic URL of a page on your site. The steps below match the form on this page.
http://www.example.com/test.php?firstid=1&secondid=10. If you leave off the protocol, the tool assumes http. If you start with https, it keeps https.To convert another address, use the link on the results page to start again.
Take the sample address http://www.example.com/test.php?firstid=1&secondid=10. The tool reads the script name (test.php), the name without its extension (test) and the two parameters (firstid and secondid).
The generated URL is test-firstid-1-secondid-10.htm. The pattern example reads test-firstid-(Any Value)-secondid-(Any Value).htm, which tells you any values will work in those positions. The rules begin with Options +FollowSymLinks and RewriteEngine on, then add one line: RewriteRule test-firstid-(.*)-secondid-(.*)\.htm$ test.php?firstid=$1&secondid=$2.
The generated URL is test/firstid/1/secondid/10/. The rules use the same two opening lines, then two rewrite lines: one that matches the address with a trailing slash and one that matches it without. Both send the visitor to test.php?firstid=$1&secondid=$2.
Each (.*) captures a value from the clean address, and $1 and $2 place those values back into the query string in order. So a request for test-firstid-7-secondid-300.htm runs test.php with firstid=7 and secondid=300.
| Feature | Single-file style | Folder style |
|---|---|---|
| Separator | Hyphens | Slashes |
| Ending | .htm extension | Trailing slash |
| Rules generated | One rewrite line | Two rewrite lines |
Each result gives you a clean URL to publish and a block of rules that makes it work. Reading them correctly saves you from the most common setup errors.
A good result is a short, readable address with only a few parameters. A poor result is one with five or six parameters, such as list.php?a=1&b=2&c=3&d=4&e=5, because the clean URL becomes just as long and hard to read as the original. In that case, consider simplifying the parameters in your application first.
Choose the single-file style when you want addresses that look like static pages. Choose the folder style when you want a tidy hierarchy and a trailing slash. Pick one style per script and stay consistent, so the same page is not reachable under several different clean addresses.
On Apache, you rewrite a URL by enabling the rewrite engine and adding a rewrite rule in the .htaccess file or the server configuration. This tool writes those Apache rules for you.
Nginx and IIS use different syntax, so the pasted block will not work there as is. Nginx uses its own rewrite directive inside the server configuration. IIS uses its URL Rewrite module, with rules stored in the site's web.config file. You can still use this tool's output as a guide: the pattern in brackets and the target script with its parameters show you what to recreate in the other format.
On Apache, the server must have mod_rewrite enabled and your hosting must allow .htaccess overrides. Most shared hosts do. If the rules have no effect, ask your host to confirm both settings.
No. In Java servlets, "URL rewriting" usually means appending a session ID to a link so the server can track a visitor who has cookies disabled. That is session management, not SEO.
This page deals with the other meaning: turning parameter-heavy addresses into clean ones. If you searched for servlet or session tracking, this tool will not generate that kind of code.
Anyone who runs a site that exposes query strings in its public addresses can use it. The common cases are specific.
page.php?id=12.Most problems come from the input, the file location or the way old links are handled. Check these points first.
The tool only works with dynamic URLs. If you paste http://www.example.com/about.php with no question mark and parameters, you will see a message saying the address does not look dynamic. Add at least one parameter and submit again. If the address is not valid at all, you will see an error asking you to check it.
The rules refer to the script by filename, so the .htaccess file belongs in the same folder as that script. If your script lives in a subfolder and you paste the rules in the site root, the clean URL will return a 404 error.
The rules make the clean address work, but they do not change the links on your pages. Edit your navigation, internal links and sitemap to use the new address. Use a tool such as the URL encoder and decoder when a parameter value contains spaces or special characters that must be encoded.
The old dynamic address keeps working after you add the rules, so the same content can load at two addresses. To avoid duplicate versions in search results, add a canonical tag pointing to the clean URL, or set up a 301 redirect from the old address. The generated rules do not include redirects.
Back up your current .htaccess file, paste the new rules, then load a real clean address in a browser. A 500 error usually means a typo or a server that does not allow the Options line. Restore the backup and ask your host which directives are permitted.
The tool generates rules for Apache only, and it builds them from the one example URL you supply. It treats every parameter value as a wildcard, so the rules accept any value in those positions. Your script should still validate what it receives.
Values that contain hyphens or slashes can be ambiguous in the single-file style, because the pattern matches loosely. If your values are plain numbers or simple words, this is rarely a problem. If they are not, test several real examples before going live.
The output keeps your parameter names in the clean address, such as firstid and secondid. For fully descriptive addresses like /shoes/running/, you will need to adjust the rules or change how your application builds links.
Once your clean addresses are live, you can share them easily, and a URL shortener or bulk URL shortener helps when you need compact links for social posts. You can find more helpers in the online calculators and utilities category.
Paste your own dynamic address into the form above, pick the style you like, copy the rules and test them on your server. In a couple of minutes you can replace a parameter-heavy link with one that people can read and remember.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market