Archive for February, 2016

NGINX redirect 404 and 403

location / {
error_page 404 = @foo;
error_page 403 = @foo;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
#Redirect to root
location @foo {
rewrite .* / permanent;
}

Advertisements

Leave a comment