Hello!
Please tell me what is wrong in the code? Why when I try to access the site via a link without WWW, I redirect to www.site.ru/index.php?q=sss/sss/sss instead of www.site.ru/sss/sss/sss
When I simply follow links from the WWW, everything works out properly.
Here is an example of my .htaccess.
AddDefaultCharset utf-8 php_flag magic_quotes_gpc Off php_flag register_globals 0 Options +FollowSymLinks RewriteEngine On RewriteBase / ############################################################################ #### Убираем повторяющиеся слеши (/) в URL #### ############################################################################ RewriteCond %{REQUEST_URI} ^(.*)/{1,}$ # Проверяем, повторяется ли слеш (//) более двух раз. RewriteRule . %1%2 [R=301,L] # Исключаем все лишние слеши. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php?q=$0 [L,QSA] RewriteCond %{HTTP_HOST} ^site\.ru$ [NC] RewriteRule ^(.*)$ http://www.site.ru/$1 [R=301,L] ErrorDocument 404 /404.php Options -Indexes