RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{QUERY_STRING} ^(.+) [NC]
RewriteRule ^(.*)$ /$1? [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+) [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1? [L,R=301]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
%{QUERY_STRING} ^(.+)
на %{THE_REQUEST} \?
AllowOverride All
в настройках VirtualHost.RewriteRule ^(.*)$ /index.php?action=$1 [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?action=$1 [QSA,L]
./feed/$
RewriteCond %{REQUEST_URI} ./feed/$
RewriteRule ^.*$ https://example.com/v5dl/? [R=301,L]
RewriteRule /feed/$ https://example.com/v5dl/? [R=301,L]
RewriteCond %{THE_REQUEST} " /blog\?start=19 "
RewriteRule ^ https://drugoysite.ru/blog/? [L,R=301]
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} /pages/([^.]+)\.php [NC]
RewriteRule ^ /%1 [L,R=301]
RewriteCond %{QUERY_STRING} (?:^|&)id=([^&]+)
RewriteRule ^id$ /%1? [R=301,L]
RewriteRule ^(id_\d+)$ pages/id.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/pages/$1\.php -f
RewriteRule ^([^.]+?)/?$ pages/$1.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^([^.]+?)/?$ $1.php [L]
rewrite ^(/*/.*)/portname=(.*) https://<ip_raritan>/dpa.asp?portname=$2&username=user&password=password last;
https://<ip_raritan>
. Тогда перенаправление будет внутренним и не будет редиректа с кодом 302 и в браузере URL не будет меняться.rewrite ^(/.*)/portname=(.*) /dpa.asp?portname=$2&username=user&password=password last;
RewriteEngine On
RewriteCond %{THE_REQUEST} " /color\.html"
RewriteRule ^ /color/ [R=301,L]
RewriteRule ^color/$ /color.html [L]
RewriteRule "^articles/ (текст вначале списка продукции)/$" /articles/ [R=301,NC,L] RewriteRule ^articles/\ (текст\ вначале\ списка\ продукции)/$" /articles/ [R=301,NC,L]
RewriteRule "^articles/ \(текст вначале списка продукции\)/$" /articles/ [R=301,L]
RewriteRule ^articles/\ \(текст\ вначале\ списка\ продукции\)/$ /articles/ [R=301,L]
RewriteRule ^articles/%20%28%D1%82%D0%B5%D0%BA%D1%81%D1%82%20%D0%B2%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BA%D0%B0%20%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%86%D0%B8%D0%B8%29/$ /articles/ [R=301,NC,L]
RewriteCond %{THE_REQUEST} "^\S+ /articles/%20\(%D1%82%D0%B5%D0%BA%D1%81%D1%82%20%D0%B2%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%B5%20%D1%81%D0%BF%D0%B8%D1%81%D0%BA%D0%B0%20%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%86%D0%B8%D0%B8\)/[ ?]"
RewriteRule ^ /articles/ [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)q=%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D0%B8-%D0%94%D0%B5%D1%82%D1%81%D0%BA%D0%B8%D0%B5\+%D0%BA%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D0%BA%D0%B8(?:$|&)
RewriteRule ^2-glavnaya$ /? [R=301,L]
RewriteEngine On RewriteCond %{REQUEST_URI} ! \.html$ RewriteCond %{REQUEST_URI} ! /$ RewriteRule ^(.*)$ $1.html
! \.html$
и тут ! /$
пробелов быть не должно, иначе ошибка синтаксиса.^(.*)$
на ^([^.]+)$
чтобы не ловило файлы css, js.RewriteEngine On
RewriteCond %{REQUEST_URI} !\.html$
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^([^.]+)$ /$1.html [L]
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^([^.]+)$ /$1.html [L]
RewriteRule ^pictures/product/[^/]+/(\d+)_\w+\.(jpe?g|png)$ /wp-content/uploads/$1.$2 [R=301,L]
RewriteCond %{QUERY_STRING} (?:^|&)(page-\d+)
RewriteRule ^category/$ https://site.ru/$0%1? [R=301,L]