RewriteEngine On
RewriteCond %{THE_REQUEST} " /(pages/|[^?]*\.php)" [OR]
RewriteCond %{SERVER_PORT} !443 [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(pages/|)(.*?)(\.php|$) https://site.ru/$2 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/pages/$1.php -f
RewriteRule ^(.*)$ pages/$1.php [L,QSA]
RewriteCond %{REQUEST_URI} ^(.*/)\d+-([^/]+\.html)$
RewriteRule ^ %1%2 [R=301,L]
RewriteRule ^(|.*/)\d+-([^/]+\.html)$ /$1$2 [R=301,L]
ServerName domain.ru
ServerAlias *.domain.ru
ServerSignature Off
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.ru [NC]
RewriteRule ^/(.*) http://www.domain.ru/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?+.+\.domain\.ru$ [NC]
RewriteRule ^/(.*)\.html$ /index.php?page=$1 [L]
%XX
RewriteRule ^наши-услуги/оценка-жилой-недвижимости/оценка-доли-в-квартире/$ https://psocenka.ru/ocenka-doli-v-kvartire [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sms\.example\.com$
RewriteCond %{QUERY_STRING} ^user=([^&]+)&pass=([^&]+)&action=post_sms&target=([^&]+)&sender=([^&]+)&message=([^&]+)
RewriteRule ^public/http/$ http://s1.example.com/sys/send.php?login=%1&psw=%2&sender=%4&phones=%3&mes=%5 [R=301,L,NE]
RewriteRule ^restoran/list/11$ https://www.site.com/catalog/restorany/ [L,R=301]
RewriteRule ^(.*)$ index.php?kohana_uri=$1
Redirect 301 /oldpage https://site/newpage
RewriteRule ^([^?]*)$ /index.php?path=$1 [NC,L,QSA]
RewriteRule ^oldpage$ https://site/newpage [R=301,L]
DirectoryIndex index.html index.shtml index.pl index.cgi index.php
RewriteEngine On
RewriteBase /
# HTTPS
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www.site.ru$ [NC]
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteRule ^oldpage$ https://site.ru/newpage [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/admin/
RewriteRule ^([^?]*)$ /index.php?path=$1 [NC,L,QSA]
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>