Skip to content

Works with trailing slash, but cannot make it work without. (static web-app) #1633

Answered by flindby
flindby asked this question in Q&A
Discussion options

You must be logged in to vote

I solved it with a ASP.NET redirect, like so:

var rewriteOptions = new RewriteOptions();
rewriteOptions.AddRedirect("^(.*/)?app$", "$1app/", 301);
app.UseRewriter(rewriteOptions);

app.UseEndpoints(enpoints => endpoints.MapReverseProxy())"

But can this be solved with a more straightforward approach?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Tratcher
Comment options

@flindby
Comment options

Answer selected by flindby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants