Reputation: 9474
I am trying to write SEO friendly URL of below URL.
www.url.com/item.php?id=_84_113_112&lang=en
I have written below code:
RewriteRule ^(.*)/(.*)/$ item.php?id=$2&lang=$1 [QSA,L]
But not working, can anyone help?
Upvotes: 0
Views: 53
Reputation: 81
You can use this -
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ item.php?id=$1&lang=$2
Upvotes: 0
Reputation: 8032
Probably extra /
at the end (before $) is the problem.
Change it to like this.
RewriteRule ^(.*)/(.*)$ item.php?id=$2&lang=$1 [QSA,L]
Upvotes: 1