A serious problem happened after migrating a server from Ubuntu to Debian. Debian won't allow two files, for example "a.html
" and "A.html
" to be in the same directory.
My server gets three types of requests and this is the current status:
requests such as /archive/2014/www.Test.com
are supplied with the file: /archive/2014/blank.html
requests such as /archive/2015/Test.com
and /archive/2015/www.Test.com
are supplied with the file /archive/2015/T.html
requests such as /archive/2015/test.com
and /archive/2015/www.test.com
are supplied with the file /archive/2015/t.html
I want the last two types of requests to supply the file /archive/2015/t.html
in both cases (in an case insensitive way).
How could I achieve this outcome?
The current server settings are:
server {
listen 127.0.0.1:80;
server_name 127.0.0.1;
access_log /srv/siteone/logs/access.log;
error_log /srv/siteone/logs/error.log error;
location / {
root /srv/siteone/html;
index index.html index.htm;
expires 1d;
}
rewrite ^/archive/2014/(.+)$ /archive/2014/blank.html last;
rewrite ^/archive/2015/(www\.)*(.)(.+)$ /archive/2015/$2.html last;
error_page 403 /403.html;
error_page 404 /404.html;
}