From b8d2ceb2d0e5083dd98cccde4c62abefc0f47f4a Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Thu, 3 Nov 2016 12:05:54 +0100 Subject: [PATCH] Update Startup.cs --- src/Squidex/Startup.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Squidex/Startup.cs b/src/Squidex/Startup.cs index ffb910f47..cc96ea758 100644 --- a/src/Squidex/Startup.cs +++ b/src/Squidex/Startup.cs @@ -152,15 +152,20 @@ namespace Squidex app.UseWebpackProxy(); app.Use((context, next) => { - context.Request.Path = new PathString("/index.html"); - + if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) + { + context.Request.Path = new PathString("/index.html"); + } return next(); }); } else { app.Use((context, next) => { - context.Request.Path = new PathString("/build/index.html"); + if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) + { + context.Request.Path = new PathString("/build/index.html"); + } return next(); });