1
www.mrmerch.com/TERMSとwww.mrmerch.com/termsの両方にアクセスしたいと考えています。私は現在、これを達成するために2つのサブフォルダを設定しています - 用語と用語。非効率的で間違っている、私は知っている。nginxの大文字と小文字を区別しないURL
ここは私の現在の設定です。最後の位置ブロックを追加しましたが、それでも正確に一致しないものはヒットできません(例:「利用規約」など)。どんな助けでも大歓迎です。ありがとう!
server {
server_name www.mrmerch.com;
return 301 $scheme://mrmerch.com$request_uri;
}
server {
listen 80 default_server;
server_name mrmerch.com;
server_tokens off;
access_log /var/log/nginx/mrmerch.access_log;
error_log /var/log/nginx/mrmerch.error_log;
root /home/paul/www/mistermerch.com/;
try_files $uri $uri/ /index.php$is_args$args;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6].";
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location /artwork {
alias /home/mistermerch/www/;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME /home/paul/www/mistermerch.com$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
location ~* ^/Terms/ {
}
}