Reputation: 6365
Eg:
RewriteRule ^/?(us|uk)/(national|regional)/([a-z0-9]+)/?$ /fetch/index.php?country=$1&scope=$2&page=$3 [NC,L]
In the above rule, the last part ([a-z0-9]+)
specifies the page number. The page number may be there or may not be there. In both cases, the rule should work. Is it possible to do this?
Right now, I have one rule for when a page number is supplied, and another for when it's not.
How can I write a single rule that'll get through when a page number is supplied and even when not?
So:
http://www.example.com/us/national/ -> allowed with no page number
http://www.example.com/us/national/pg3 -> allowed with page number
Upvotes: 1
Views: 32