server {
listen 80;
server_name example.com www.example.com;
root /var/www/example.com;
index index.php;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}try_files $uri $uri/ /index.php?route=$uri&$args;/index.php -> /
/index.html -> /
/dir/index.php -> /dir/
/dir/index.html -> /dir/location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}<VirtualHost *:80> слушает на всех интерфейсах и после ProxyPass /api http://141.x.x.25/ запрос снова попадёт в этот же VirtualHost.ProxyPass / http://127.0.0.1:3000/<VirtualHost 141.x.x.25:80>
ProxyPass /api http://127.0.0.1 RewriteRule ^(.*)services/b2b b2b [R=301, L][R=301, L] должно быть [R=301,L]./services/b2b куда редиректит?/services/b2b?123/services/b2b/123Redirect 301 /page/subpage / удалили?При ручном режиме у меня выходит ошибка Internal Error или что то подобное.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/index.php?$1 [L,QSA]RewriteEngine On
RewriteBase /
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.*)$ public/$1 [L] $str = preg_replace_callback(
'#\(((?>[^\(\)]+)|(?R))+\)#u',
function($mtchs) {
return preg_replace( '#\s+#u', '^', $mtchs[0] );
},
$str
);
if (preg_last_error() !== PREG_NO_ERROR) {
// Что-то пошло не так
} [^()]+ убрать квантификатор [^()] если в строке есть лишняя открывающая скобка, например x + (((3-2) + (3*(4+5))) + y, то шаблон почему-то ничего не захватывает.
Location: https://mydomain.org/signproxy_redirect https://$host/ /service1/;Location: /sign можно добавить proxy_redirect / /service1/; curl -I -H 'Host: mydomain.org' https://192.168.0.1/location /service1/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://192.168.0.1/;
proxy_redirect https://$host/ /service1/;
proxy_redirect / /service1/;
}
/page/?price_min=123&price_max=321И редирект нужен на
/page/?getpriceИли так
/page/?getprice&price_min=123&price_max=321Или как-то иначе?