I am trying to get redirections back to index.html when foo
parameter is given after cloudshareimage/foo
instead of a 404....with foo
removed. Or any other parameter for that matter.
Any idea why this is not working on nginx?
server {
listen 80;
server_name www.cloudshareimage.com cloudshareimage.com;
access_log /var/log/nginx/cloudimageshare.log;
client_header_buffer_size 128;
expires -1;
access_log /var/log/nginx/cloudimageshare.log;
root /var/www/cloudshareimage/app/static/;
error_page 404 = @notfound;
location / {
error_page 404 = @notfound;
}
location @notfound {
return 301 /;
}
}
- - [27/Mar/2020:07:54:50 -0500] "GET /foo HTTP/1.1" 404 233 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
0 Answers