Bagaimana cara untuk IP canonicalization dan URL canonicalization di nginx?
kalau di buka http://111.222.333.444 forward ke http://www.domain.com
kalau buka http://domain.com forward ke http://www.domain.com
ini default.conf saya:
------------------------begin------------------
server {
listen 80;
server_name domain.com www.domain.com;
root /home/user/www/domain.com/public_html;
index index.php index.html;
include /etc/nginx/default.d/*.conf;
location / {
try_files $uri/ $uri /index.php?mod=$uri&$args;
}
error_page 404 /404.php;
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;
}
rewrite ......
dst..........
}
----------------------------end-----------------------
terima kasih