Contoh:
server {
server_name selebriti.co.id www.selebriti.co.id;
access_log /var/log/nginx/selebriti.co.id.access.log rt_cache;
error_log /var/log/nginx/selebriti.co.id.error.log;
root /var/www/selebriti.co.id/htdocs;
index index.php index.html index.htm;
location ~* ^/kamus(.*)$ {
return 301 $scheme://$host;
}
include common/php.conf;
include common/wpcommon.conf;
include common/locations.conf;
include /var/www/selebriti.co.id/conf/nginx/*.conf;
}
Pointnya disini:
location ~* ^/notizie(.*)$ {
return 301 $scheme://$host/news$1;
}