RewriteEngine On
RewriteBase /

# Делаем редирект на основной адрес , без www 
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]


# переносим на url со слешем 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(^/manager/.*|^assets/components/phpthumbof/.*)
RewriteCond %{REQUEST_URI} !^(.*)(.html|.xml|.htm|.shtml|.css|.js|.json|.rss|.txt|.pdf|.jpg|.gif|.jpeg|.ico|.png)$
RewriteRule ^.+[^/]$ http://stone-rus.ru%{REQUEST_URI}/ [L,R=301]

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

php_flag register_globals Off

AddDefaultCharset utf-8
AddType 'text/html; charset=utf-8' .html .htm .shtml









 

# убираем слеш с конца url
#RewriteCond %{HTTP_HOST} (.*)
#RewriteCond %{REQUEST_URI} !^/manager/.*
#RewriteCond %{REQUEST_URI} /$ [NC]
#RewriteRule ^(.*)(/)$ $1 [L,R=301]