First, you need a web server that allow you to do rewrites. For example, Apache Web Server with the mod_rewrite module.
In your .htaccess file in the root direct you can use one of the follow basic rewrite instructions.
A rewrite that will accept all characters after the forward slash:
- RewriteEngine on
-
RewriteRule ^item/(.*)?$ /products.php?name=$1
If you'd like to restrict the characters for item to letters & numbers you can use the following
- RewriteEngine On
-
RewriteRule ^item/([a-zA-Z0-9]+)$ /products.php?name=$1