RewriteRule ^product/([^/]+)\.html$ /replace.php [L]
<?php
if (preg_match('#^/product/([^/]+)\.html#', $_SERVER['REQUEST_URI'], $match)) {
$str = $match[1];
$str = str_replace('ja', 'ya', $str);
$str = str_replace('_', '-', $str);
header("Location: https://site.ru/shop/{$str}/", true, 301);
die();
}
RewriteCond ya$1 ^(ya)(.*)ja(.*)|^ya(.*)
RewriteCond -%2%1%3%4 ^(-)(.*)_(.*)|^-(.*)
RewriteCond -%2%1%3%4 ^(-)(.*)_(.*)|^-(.*)
RewriteRule ^product/([^/]+)\.html$ https://site.ru/shop/%2%1%3%4/ [R=301,L]
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} \?
RewriteCond %{THE_REQUEST} \?
RewriteCond %{THE_REQUEST} "! /calculator/"
RewriteRule ^(.*)$ /$1? [R=301,L]
rewrite ^/catalog/razdel-1/(.*)$ https://foo.ru/catalog/NOVIY-RAZDEL/$1 permanent;
RewriteRule ^catalog/razdel-1/(.*)$ https://foo.ru/catalog/NOVIY-RAZDEL/$1 [R=301,L]
Redirect 301 /page/subpage /
нужно поменять на RewriteRule.RewriteRule ^page/subpage$ /? [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Redirect 301 /files/music/ https://site2.ru/files/music/
RewriteCond %{HTTP_HOST} ^site1\.ru [NC]
RewriteRule ^files/music/.+ https://site2.ru/$0 [R=301,L]
RewriteCond %{HTTP_HOST} ^site1\.ru [NC]
RewriteRule ^files/music/.+ https://site2.ru/$0 [P]
Redirect 301 /kollekciya-proektov/ https://---.ru/index.html
Redirect 301 /kollekciya-proektov/t-100/ https://---.ru/projects.html
Redirect 301 /kollekciya-proektov/t-100/ https://---.ru/projects.html
Redirect 301 /kollekciya-proektov/ https://---.ru/index.html
RedirectMatch 301 ^/kollekciya-proektov/$ https://---.ru/index.html
RedirectMatch 301 ^/kollekciya-proektov/t-100/$ https://---.ru/projects.html
/.htaccess
# если /lk/
RewriteRule ^lk/(.*)$ lk/dist/client/$1 [L]
/lk/dist/client/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
<FilesMatch ".(zip|7z|rar|txt|sql)$(?<!^robots\.txt)">
Order Allow,Deny
Deny from all
</FilesMatch>
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
[R=301,L]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^(.*)index\.(php|html|htm)$ https://%{HTTP_HOST}%$1 [R=301,L]
%$1
/
или /$1
RewriteRule ^(.*)index\.(php|html|htm)$ https://%{HTTP_HOST}/ [R=301,L]
RewriteEngine on
RewriteRule ^tex(.*)$ /cgi-bin/mathtex.cgi?$1 [L,QSA]
RewriteCond %{REQUEST_URI} !^/cgi-bin/mathtex\.cgi
RewriteRule ^(.*)$ public/$1 [L]
/
т.е. всегда остается просто info/.^info/?$
убрать /?
то правило будет срабатывать только для site.ru/infoRewriteCond %{THE_REQUEST} ^[^?]+//
RewriteRule .* /$0 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^https?://ireenamyha\.myjino\.ru/videovier\.php
RewriteRule \.mp4$ - [F]