Answer the question
In order to leave comments, you need to log in
How to set mod_rewrite rule in .htaccess to output type /category/article?
On the site, all urls will be of this type
domen.ru
domen.ru/category/
domen.ru/category/node/
domen.ru/category/
I want to lead them all to /index.pxp?r=site&cat=$1&cat=$2
tried so
RewriteRule
^(.+)/(.+)/$ /index.php?r=site&cat=$1&node=$2
didn't work
Answer the question
In order to leave comments, you need to log in
RewriteEngine on
RewriteBase /
Options +FollowSymLinks -Indexes -ExecCGI -Includes
RewriteCond %{HTTP_HOST} ^www\вашсайт\.ua$ [NC]
RewriteRule ^(.*)$ http://вашсайт.ua/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !(favicon.ico)$ [NC]
RewriteRule ^.*$ index.php [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question