Empty index.html file download
If you just want to avoid directory listing, it might just be better to make one single page for the error code , then change the following in your Apache configuration: Options Includes Indexes FollowSymLinks MultiViews to: Options Includes FollowSymLinks MultiViews removing Indexes from the list. SeinopSys SeinopSys 8, 9 9 gold badges 55 55 silver badges bronze badges. Nillervision Nillervision 2 2 silver badges 10 10 bronze badges. Jukka K. Korpela Jukka K. Korpela k 33 33 gold badges silver badges bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. In the next dialog box, select Empty as template.
Though the process of making index. Let Visual studio restores the nuget packages. Before we add our index. First , we need to add a package "Microsoft. StaticFiles": "1. This package allows to serve all kind of static files. So open Project.
As soon as you save the file, VS will download this package and install it. And second thing, we need to do is to add the required middleware to startup. So add following 2 middleware in configure method. You need to also add UseStaticFiles to actually serve the file. UseStaticFiles — This middleware is responsible for serving all static files present in wwwroot folder.
Remember , order of middleware is very important. UseDefaultFiles ; should be added before app. UseStaticFiles ; in the pipeline. Read How ASP. NET Core 1. Use vs app. Run in ASP. NET Core middleware.
Right click on wwwroot folder and add index. The folder names in the image above have been blacked out for security reasons - we don't want to be accused of anything illegal just because we use the screenshot as a demonstration. If you don't care whether or not files can be seen and accessed, then please feel free to remove the blank "index.
Follow OS Templates.