rewriterule - преобразование адреса. Помогите

SiZE

Новичок
rewriterule - преобразование адреса. Помогите

Есть адреса вида:
http://host.ru/dir/show_cat/1
http://host.ru/dir/show_cat/1/
http://host.ru/dir/show_cat/1/?page=1
http://host.ru/dir/show_cat/1/?page=2

Они по моей идее должны ссылаться на:
http://host.ru/dir/index.php?action=show_cat&id=1
http://host.ru/dir/index.php?action=show_cat&id=1
http://host.ru/dir/index.php?action=show_cat&id=1&page=1
http://host.ru/dir/index.php?action=show_cat&id=1&page=2

В файле .htaccess есть строчка:
RewriteRule ^show_cat/([0-9]+)/?$ index.php?action=show_cat&id=$1

Которая почему-то обрабатывает и строчки:
http://host.ru/dir/show_cat/1/?page=1
http://host.ru/dir/show_cat/1/?page=2

Изменил строку немного:
RewriteRule ^show_cat/([0-9]+)/(.*)$ index.php?$2action=show_cat&id=$1

переменная "page" не видится в файле index.php. Как это пофиксить?

-~{}~ 17.05.06 16:36:

актуально :(
 
Сверху