I have a problem with URL rewriting. This is the rule
RewriteRule ^(.*)-(.*)-(.*)\.html$ file.php?name=test&a=$1&b=$2&c=$3
The rule work’s fine on a link like this:
test-11-abc.html
But I have a problem if the third variable have a dash like:
test-11-ab-c.html
The rewrite doesn’t work.
Try this:
You need to make the first 2 matches non-greedy, because they’re gobbling up the first
-.