: You can have optional parts, if your PHP script accepts an empty size parameter and then does what you want. Try this: RewriteRule ^catalog/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/([a-z0-9_-]+-([0-9]+)/)?
You can have optional parts, if your PHP script accepts an empty size parameter and then does what you want.
Try this:
RewriteRule ^catalog/[a-z0-9_-]+-([0-9]+)/[a-z0-9_-]+-([0-9]+)/([a-z0-9_-]+-([0-9]+)/)? index.php?act=catalog&category=&color=&size= [NC,L]
The important changes are one more parenthesized group, followed by an ? (to make it optional), and an adaption of the capture number from to (since the capturing group for the size is now the 4th one). (Instead of the number change we could also have used (?: instead of the added (, I guess.)
More posts by @Megan663
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.