diff --git a/Rakefile b/Rakefile index f07c06f0..2ae1c9b3 100644 --- a/Rakefile +++ b/Rakefile @@ -151,7 +151,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.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 {