网址重写htaccess删除部分网址

First, I know how to rewrite a URL like example.com/test.php?id=1.

What I dont know is how to remove the test.php part of the url so that the new url is called:

example.com/1/

I hope someone know how to do that, and yes, I've read a hundreds of SO items about it.

Thanks

I'm not sure what you mean by removing if you are about to rewrite old one into new one. For example you can do it this way:

RewriteEngine On
RewriteRule tag/s/(.*) test.php?id=$1 [L]

Welcome on Stack Overflow.