Forum Moderators: phranque
If possible, get rid of that leading ".*" in the pattern, as it will cause repeated matching attempts (not good for a busy server). By being very specific about what ends that sub-pattern (the "/"), you allow the whole pattern to be matched left-to-right in one shot:
RewriteRule ^(([^/]+)/)+([0-9\-]+)\.htm(.*)$ dv4.cgi?keyword=$2&discussion=$3$4 [T=application/x-httpd-cgi]
RewriteRule ^([^/]+)/([0-9\-]+)\.htm(.*)$ dv4.cgi?keyword=$1&discussion=$2$3 [T=application/x-httpd-cgi]
Jim