制作没有ID的SEO友好URL

I have a following URL: currently example.com/user/1 - where i should be example.com/user/name-city. The URL I tried so far is: RewriteRule ^db/user/([a-zA-Z0-9_-]+)/$ list.php?id=$1

How do I achieve my desired result?

Update: A Inique ID will be passed in INPUT URL but will not be shown in output URL>

As I understand, you want to change id to 2 variables - name and city?

The following rule should work as you desire:

RewriteRule ^db/user/([a-zA-Z0-9]+)-([a-zA-Z0-9]+)/$ list.php?name=$1&city=$2