drbigfresh Posted July 21, 2007 Share Posted July 21, 2007 I have a simple rule for my site: RewriteRule showquestions/(.*)/(.*)/(.*)/(.*)/$ /nursingfaqs/showquestions.php?$1=$2&$3=$4 that converts showquestions.php?showcatid=123&page=3 into: /nursingfaqs/showquestions/showcatid/25/page/3/ and it works fine, but the problem is that I don't always have the page=x part... sometimes the page is called is called without it, an I can't figure out how to write the rule so that the page=x part is optional.... any help is much appreciated. Thanks, Scott. Link to comment https://forums.phpfreaks.com/topic/61148-mod-rewrite-help/ Share on other sites More sharing options...
hackerkts Posted July 22, 2007 Share Posted July 22, 2007 RewriteRule ^showquestions/(.*)/(.*)/(.*)/(.*)?/?$ /nursingfaqs/showquestions.php?$1=$2&$3=$4 ? means optional Link to comment https://forums.phpfreaks.com/topic/61148-mod-rewrite-help/#findComment-304429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.