apache - Complex htaccess rewrite rules - where do i start? -
I have already asked about mod_rewrite here and got the correct answer but now I need some complex and really need somebody The advice of such a person who knows better mod_rewrite.
My rewriting rule looks like this so far:
RewriteRule ([a-zA-Z _-] +) / ([0-9] ?) Index.php? Cat = $ 1 and page = $ 2
and it shows the URL as follows: / categoryname
and shows the page like / categoryname / 1 /
.
But I would really like to modify the rule of working with sub categories such as / categoryname / subcategoryname /
and still page system ( subcat / 2 /
), but I can not wrap my head around it.
If you are, then sub-cat rewrites need to be ignored on the main category etc.
Can anyone help me in hopes.
rewrite rule [a-zA-Z _-] + / ([a-zA -Z_-] +) / ([0- 9]?) Index.php? C = $ 1 and page = $ 2 [L] rewrite Raoul ([a-zA-Z _-] +) / ([0- 9]?) Index.php? Cat = $ 1 and page = $ 2 [L]
Comments
Post a Comment