Volatil3
Volatil3

Reputation: 14978

Making SEO friendly URL without ID

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>

Upvotes: 0

Views: 602

Answers (1)

Kocik
Kocik

Reputation: 504

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

Upvotes: 1

Related Questions