htaccess rewriterule question

Posted by Viktor Onozo on Stack Overflow See other posts from Stack Overflow or by Viktor Onozo
Published on 2010-02-03T10:07:56Z Indexed on 2010/05/30 16:02 UTC
Read the original article Hit count: 412

Filed under:
|
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&$3 [L]

RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/(.*)/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3&$4 [L]

RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)(/{0,1})/[a-z\-_0-9\+]*$ /main.php?id=$2&il[lang]=$1 [L]

RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/([0-9]*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3 [L]

RewriteRule ^([a-z]{2}/){0,1}showCategory$ /main.php?id=0&il[lang]=$1 [L]

I use these lines and localhost/showCategory/ is OK, localhost/showCategory/0/1 is OK, localhost/showCategory/0/2 stays on the first page...(same 0/1) not good What is the problem?

When I delete this /[a-z\-_0-9\+]* from the 3. and 4. line then it's OK,

but then is a problem with this URL: http://localhost/showCategory/627/prodaja-automobila

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about mod-rewrite