jacko310592
08-19-2010, 01:15 AM
hey guys,
the rule below currently rewrites a URL such as:
"mydomain.com/profile/pictures.php?profile=BLAH&imageid=999&page=11"
to:
"mydomain.com/BLAH/pictures/999/11/"
RewriteRule ^([^/]+)/pictures/([^/]+)/([^/]+)/?$ profile/pictures.php?profile=$1&imageid=$2&page=$3 [NC,QSA,L]
..but i need this rule to also work even if the "imageid" and "page" variables are not set; so i can use URLs such as:
"mydomain.com/BLAH/pictures/999/"
and:
"mydomain.com/BLAH/pictures/"
can anyone please suggest how my RewriteRule needs to be changed for it to work with the above URLs?- or would it be a matter of writing an additional two rules for URLs without those variables set?
hope ive explained myself well, thanks for any help
the rule below currently rewrites a URL such as:
"mydomain.com/profile/pictures.php?profile=BLAH&imageid=999&page=11"
to:
"mydomain.com/BLAH/pictures/999/11/"
RewriteRule ^([^/]+)/pictures/([^/]+)/([^/]+)/?$ profile/pictures.php?profile=$1&imageid=$2&page=$3 [NC,QSA,L]
..but i need this rule to also work even if the "imageid" and "page" variables are not set; so i can use URLs such as:
"mydomain.com/BLAH/pictures/999/"
and:
"mydomain.com/BLAH/pictures/"
can anyone please suggest how my RewriteRule needs to be changed for it to work with the above URLs?- or would it be a matter of writing an additional two rules for URLs without those variables set?
hope ive explained myself well, thanks for any help