return 301 https://$host$request_uri;proxy_pass.server {
listen 443 ssl;
server_name ваш-домен.ру;proxy_pass https://берём-содержимое.ру;
proxy_cookie_domain берём-содержимое.ру ваш-домен.ру; RewriteCond %{THE_REQUEST} "! /catalog/filter/"
RewriteCond %{THE_REQUEST} "! /catalog/product/"
RewriteRule ^catalog(/.+)$ /catalog/product$1 [L,R=301] $text = 'Просто текст 12345';
$matches = [];
$text = preg_replace_callback('~[0-9]~', function($match) use(&$matches) {
$matches[] = $match[0];
return '';
}, $text);
var_dump($text, $matches); preg_match('/\x{fe0f}\x{20e3}/u', $str, $match);
var_dump($match);Redirect 301 categoriya https://site.ru/categoriya-new
RewriteEngine on
RewriteRule ^categoriya$ /categoriya-new [R=301,L]
RewriteRule ^podcategoriya$ /podcategoriya-new [R=301,L]
RewriteRule ^categoriya/podkategoriya/(\S+)$ /categoriya-new/podkategoriya-new/$1 [R=301,L] location = /bitrix/admin/1c_exchange.php {
auth_basic off;
fastcgi_pass php-fpm:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} # первая страничка
location = /info/site1-page/page {
alias /home/sites/site_1/index.html;
}
# вторая страничка
location = /info/site2-page/page {
alias /home/sites/site_2/index.html;
} RewriteRule ^(.*)купить /$1 [R=301,L]^(?<name>\w\d+) никогда не совпадёт с строкой shop1 https://regex101.com/r/4rLjsI/1\w нужно добавить +^(?<name>\w+\d+) .* и флаг /s..* и pcre.backtrack_limit вам хватает.[^"]* и [^>]* или убрать флаг /s.preg_match_all('!href="([^"]*)"[^>]*title="([^"]*)"[^>]*breadcrumbs__item-link!siU',$str,$matches)) RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.сайт\.ком$
RewriteRule ^(.*)$ https://сайт.ком/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ https://сайт.ком/ [R=301,L]
RewriteRule ^en$ /en/ [R=301,L]
RewriteCond %{REQUEST_URI} (.*/[^/.]+)($|\?)
RewriteRule .* %1.html [R=301,L]
RewriteCond %{REQUEST_URI} !^/en/$
RewriteRule ^(.*)/$ /$1.html [R=301,L]
RewriteCond %{HTTP:SSL} !=1 [NC]
RewriteRule ^(.*) https://сайт.ком/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/wp-admin
RewriteRule . / [R=301,L] RewriteRule ^massaj(.*)$ http://varmedia.ru/ [R=301,L]^ означает начало строки, так что с ^massaj могут совпасть только строки начинающиеся на massaj, а вы проверяете адреса начинающиеся на category/massaj/ и редирект не происходит. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] и запрос отправляется в index.php. https://varmedia.ru/category/massajRewriteRule ^category/massaj https://varmedia.ru/ [R=301,L] RewriteRule ^(f)(/.*|)$ /$1.php$2 [L]RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^([^/.]+)(/.*|)$ /$1.php$2 [L] RewriteRule ^link/(.+)$ /link.php?key=$1 [L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]