On 5/4/06, Ryan A <genphp@xxxxxxxxx> wrote:
RewriteRule ^blog-([0-9]+).html$ index.php?act=blog&id=$1
This is fine, but you should really be escaping the "." (by writing it as "\."). Otherwise, it matches any character, not just the literal period.
mysite.com/blog/blog-2-the_great_escape.html which should be processed like this: index.php?act=blog&id=$1&string=$2 going through the regex tutoral I see I need to use "$2" for the second parameter and "$3" etc if i keep adding parameters but still getting stumped on the first regex part (eg: ^blog-([0-9]+).html$ )
You just need to add another pair of parenthesis to get the second match. For your case, it'll be something like (untested): RewriteRule ^blog-([0-9]+)-([^\.]+)\.html$ index.php?act=blog&id=$1&string=$2 Rabin -- http://rab.in -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php