jacko310592 Posted August 18, 2010 Share Posted August 18, 2010 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 recognise the above URLs?- at the moment Chrome is giving me "Oops! This link appears to be broken" messages with the above two URLs. hope ive explained myself well, thanks for any help Link to comment https://forums.phpfreaks.com/topic/211095-help-needed-with-rewriterule/ Share on other sites More sharing options...
cags Posted August 19, 2010 Share Posted August 19, 2010 You can't change that rule to achieve that result. Just add another rule. Link to comment https://forums.phpfreaks.com/topic/211095-help-needed-with-rewriterule/#findComment-1101133 Share on other sites More sharing options...
jacko310592 Posted August 19, 2010 Author Share Posted August 19, 2010 ahh, okay, thanks Link to comment https://forums.phpfreaks.com/topic/211095-help-needed-with-rewriterule/#findComment-1101203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.