sam222 - 12:18 pm on Jan 2, 2013 (gmt 0)
In my below written rule i want to use for-sale-mapjt-([^\ ]+)-cmty-([^\ ]+)-tpe-([^\ ]+) where each below part is optional but order will stay same.
(1) -mapjt-([^\ ]+)
(2) -cmty-([^\ ]+)
(3) -tpe-([^\ ]+)
RewriteRule ^([^\ ]+)/for-sale-mapjt-([^\ ]+)-cmty-([^\ ]+)-tpe-([^\ ]+)/$ /myfilename.php?mod=$1&project=$2&subproj=$3&projtype=$4 [L]
My rule doesn't work as in my rule all parts are mandatory. I need help how can i make each part optional so that if either part doesn't exist rule should still work intead of making lot of rules for each combination.