NordVPN

URL Rewriting Tool


Enter a URL



Eg. http://www.example.com/test.php?firstid=1&secondid=10


NordVPN

It is important to understand the friendly URL structure that search engines such as Google love. Search engines prefer static websites over dynamic. Meaning to have a URL without parameters. Here is what a dynamic website URL looks like:

https://www.domain.com/test.php?categoryid=1&productid=10

And here is what a static website URL looks like

http://www.example.com/test/firstid/1/secondid/10/

Both URLs are the same but different in structure. Search engines prefer the second structure because it is easier to read.

How to Use URL Rewriting Tool

Simple paste your dynamic URL into the field and click Submit. The tool will then provides you with different options on how to convert your URL into static. You just need to copy the code into your .htaccess file.

Here is an example of a static website URL .htaccess code

Options +FollowSymLinks
RewriteEngine on
RewriteRule test/firstid/(.*)/secondid/(.*)/ test.php?firstid=$1&secondid=$2
RewriteRule test/firstid/(.*)/secondid/(.*) test.php?firstid=$1&secondid=$2

The code above will turn the following URL

https://www.domain.com/test.php?categoryid=1&productid=10

to this

http://www.example.com/test/firstid/1/secondid/10/

And it can be simple modified. For example, if you want to remove the word "firstid" you can simply remove the word from the code to look like this:

RewriteRule test/(.*)/secondid/(.*)/ test.php?firstid=$1&secondid=$2