Answer the question
In order to leave comments, you need to log in
How to cancel nginx redirect for images?
Good afternoon, I redirected my entire site to https using nginx:
server {
listen 80;
server_name uwebdesign.ru;
location / {
rewrite ^ https://$server_name$request_uri permanent;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
location ^~ /feed/ {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
Answer the question
In order to leave comments, you need to log in
location / {
if ( $request_filename !~* \.(jpg|mp3)$ ) {
rewrite ^ https://$server_name$request_uri permanent;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question