H-Ghamarzadeh / HGO.ASPNetCore.FileManager

Free & Open Source File Manager for ASP.Net Core 6+ with MIT License
MIT License
36 stars 16 forks source link

Suggest add "/" to start with each file path in Extension.cs #2

Open ringo011010 opened 2 months ago

ringo011010 commented 2 months ago

In case, the file manager only can display in the top level of route like "https://localhost:1001".

If I want to implement it to other page such as "https://localhost:1001/Home/Test", the application will throw error about not found any css and javascript files.

image

ermanolca commented 2 months ago

You can add url rewrite (install Microsoft.AspNetCore.Rewrite nuget package first) setting like below:

var rewrite = new RewriteOptions() .AddRewrite(@"(.+)/hgofilemanager/(.+)", "hgofilemanager/$2", true);

app.UseRewriter(rewrite);

ringo011010 commented 2 months ago

@ermanolca it seem not work.

ulasdurmus commented 2 months ago

You can create a controller and use index action. When you try to use another action it can't work. I tried to use in admin area and i had same problem. I hope it will help you.

yigitgnc commented 1 day ago

issue fixed in my fork