bFire
Новичок
Mod Rewrite
Есть три php файла - a.php, b.php, c.php
Хочется сделать так, чтобы:
site.ru/cat/ - это а.php
site.ru/cat/c43.html - это b.php
site.ru/cat/id345.html - это c.php
мой код
RewriteRule cat/ a.php
RewriteRule cat/c([0-9]+).html b.php?id=$1
RewriteRule cat/id([0-9]+).html c.php?sid=$1
но открывается только a.php, а остальные не открываются, тупо перезагружается страница с данными a.php.
работает так
RewriteRule cat/s1.html a.php
RewriteRule cat/c([0-9]+).html b.php?id=$1
RewriteRule cat/id([0-9]+).html c.php?sid=$1
но тогда соответственно, чтобы открыть a.php нужно вводить site.ru/cat/s1.html, а хотелось бы без "s1.html"
Есть три php файла - a.php, b.php, c.php
Хочется сделать так, чтобы:
site.ru/cat/ - это а.php
site.ru/cat/c43.html - это b.php
site.ru/cat/id345.html - это c.php
мой код
RewriteRule cat/ a.php
RewriteRule cat/c([0-9]+).html b.php?id=$1
RewriteRule cat/id([0-9]+).html c.php?sid=$1
но открывается только a.php, а остальные не открываются, тупо перезагружается страница с данными a.php.
работает так
RewriteRule cat/s1.html a.php
RewriteRule cat/c([0-9]+).html b.php?id=$1
RewriteRule cat/id([0-9]+).html c.php?sid=$1
но тогда соответственно, чтобы открыть a.php нужно вводить site.ru/cat/s1.html, а хотелось бы без "s1.html"