NGINX www and non-www url standardization/canonicalization
I can't seem to get url standardization to work with nginx, the service restarts fine, so i assume the code is sound just not doing what i want it to do. Does this look right for the server blocks? I've also tried return instead of rewrite.
server {
listen 80;
server_name www.example.com;
rewrite ^ $scheme://example.com$request_uri permanent;
}
server {
listen 80;
server_name example.com;
root /usr/share/nginx/www/example.com;
index index.php index.html index.htm;
etc...
Log In to Comment