Reputation: 4326
There is this regexp in htaccess:
RewriteRule ^collection/([^/_]+)games/$ some.php?coll=$1 [L]
It works fine for url's like "/collection/somegames/"
But i want the rule to accept these url's: "/collection/some-games/" to be redirected to "some.php?coll=some"
I change it to:
RewriteRule ^collection/([^/_]+)-games/$ some.php?coll=$1 [L]
or
RewriteRule ^collection/([^/_\-]+)-games/$ some.php?coll=$1 [L]
None of the above helped.
What is the solution?
Upvotes: 1
Views: 492
Reputation: 43158
RewriteRule ^collection/([^/_]+?)-?games/$ some.php?coll=$1 [L]
There you go.
Upvotes: 2