diff --git a/nginx.conf b/nginx.conf index f3b5bd3..2214317 100644 --- a/nginx.conf +++ b/nginx.conf @@ -58,29 +58,20 @@ http { # adding some custom rules to strip out the html extension index index.html; - if (!-f "${request_filename}index.html") { - rewrite ^/(.*)/$ /$1 permanent; - } - - if ($request_uri ~* "/index.html") { - rewrite (?i)^(.*)index\.html$ $1 permanent; - } - - if ($request_uri ~* ".html") { - rewrite (?i)^(.*)/(.*)\.html $1/$2 permanent; + location /.well-known/pki-validation/338e6e57950543389847dfa7434808b8.txt { + return 200 'd0077b052dce448eadfa0e4e8e19771a'; } location / { root <%= ENV["APP_ROOT"] %>/public; - try_files $uri.html $uri $uri/ /index.html; + try_files $uri/index.html $uri.html $uri/ $uri =404; <% if File.exists?(File.join(ENV["APP_ROOT"], "nginx/conf/.enable_pushstate")) %> if (!-e $request_filename) { rewrite ^(.*)$ / break; } <% end %> - index index.html index.htm Default.htm; <% if File.exists?(File.join(ENV["APP_ROOT"], "nginx/conf/.enable_directory_index")) %> autoindex on; <% end %> diff --git a/www/404.html b/www/404.html index 06bd349..d678404 100644 --- a/www/404.html +++ b/www/404.html @@ -32,9 +32,9 @@ - - - + + + @@ -60,7 +60,7 @@

@@ -104,7 +104,7 @@

Sorry, we can’t find the page you’re looking for