Answer the question
In order to leave comments, you need to log in
How to remove cnc appending?
There are 2 pages
site.com/news-avto
site.com/avtomobili-s-probegom
If I enter such a request site.com/avtomobili I will get not a 404 page, but site.com/avtomobili-s-probegom. How to disable cnc auto-completion? Site on wp
Here is the nginx config
server {
server_name site.com www.site.com;
root /var/www/vhosts/site.com/httpdocs;
index index.php;
include /etc/nginx/sites.conf.d/global.conf;
error_log /var/www/vhosts/site.com/log/error.log error;
access_log /var/www/vhosts/site.com/log/access.log combined;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php-fpm--site.com.sock;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/site.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/site.com/privkey.pem; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
rewrite ^/avtomobili/$ https://site.com/news-auto/ permanent;
site.com/avtomobili still leads to site.com/avtomobili-s-probegom. Answer the question
In order to leave comments, you need to log in
When I do a 301 redirect
site.com/avtomobili still leads to site.com/avtomobili-s-probegom.
^/avtomobili/$
, but in the request, do not add a slash. ^/avtomobili$
or^/avtomobili/?$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question