diff --git a/Rakefile b/Rakefile index 7a0ca483..998559f4 100644 --- a/Rakefile +++ b/Rakefile @@ -509,7 +509,7 @@ task :generate_sitemap => [:environment] do site_files = [] sites.each do |site| - site.site_files_dataset.exclude(path: 'not_found.html').where(path: /\.html?$/).all.each do |site_file| + site.site_files_dataset.exclude(path: 'not_found.html').exclude(path: '404.html').where(path: /\.html?$/).all.each do |site_file| if site.file_uri(site_file.path) == site.uri+'/' priority = 0.5 diff --git a/views/templates/domain.erb b/views/templates/domain.erb index 67e8ed61..c7f46b15 100644 --- a/views/templates/domain.erb +++ b/views/templates/domain.erb @@ -8,7 +8,7 @@ server { error_page 404 = @notfound; location @notfound { - try_files /not_found.html @notfound_root; + try_files /not_found.html /404.html @notfound_root; } location @notfound_root {